From a4dee14b203e1f46ef4070412eae85d62a897fe8 Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Wed, 3 Oct 2018 13:42:41 -0700 Subject: [PATCH] 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. --- chainntnfs/txconfnotifier.go | 1 + 1 file changed, 1 insertion(+) diff --git a/chainntnfs/txconfnotifier.go b/chainntnfs/txconfnotifier.go index bf5ffe79..b7b6b69a 100644 --- a/chainntnfs/txconfnotifier.go +++ b/chainntnfs/txconfnotifier.go @@ -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