chainntnfs/tx_notifier: mark rescan as complete for transactions confirmed at tip

In this commit, we mark the rescan status for a transaction as complete
if we happen to detect it has confirmed within a new block that extends
the chain. We do this as otherwise, it's possible for us to not
immediately dispatch the notification upon a subsequent registration due
to the rescan state machine.
This commit is contained in:
Wilmer Paulino 2018-10-03 13:42:41 -07:00 committed by Conner Fromknecht
parent eee5311557
commit a4dee14b20
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

@ -500,6 +500,7 @@ func (tcn *TxConfNotifier) ConnectTip(blockHash *chainhash.Hash,
TxIndex: uint32(tx.Index()),
}
confSet.rescanStatus = rescanComplete
confSet.details = details
for _, ntfn := range confSet.ntfns {
ntfn.details = details