chainntnfs/neutrinonotify: handle spend notification registration w/ TxNotifier

In this commit, we modify the logic within RegisterSpendNtfn for the
NeutrinoNotifier to account for the recent changes made to the
TxNotifier. Since it is now able to handle spend notification
registration and dispatch, we can bypass all the current logic within
the NeutrinoNotifier and interact directly with the TxNotifier instead.

The most notable change is that now we'll only attempt a historical
rescan if the TxNotifier tells us so.
This commit is contained in:
Wilmer Paulino
2018-10-05 02:07:55 -07:00
parent 74139c9a3f
commit bfd11a251e
2 changed files with 55 additions and 156 deletions

View File

@@ -50,6 +50,7 @@ func (n *NeutrinoNotifier) UnsafeStart(bestHeight int32,
n.txNotifier = chainntnfs.NewTxNotifier(
uint32(bestHeight), reorgSafetyLimit, n.confirmHintCache,
n.spendHintCache,
)
n.chainConn = &NeutrinoChainConn{n.p2pNode}