From ddf4715e3c5e412863a00fb375bc024511ebe592 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Fri, 2 Feb 2018 17:59:11 -0800 Subject: [PATCH] chainntnfs/neutrinonotify: fix regression for historical spend dispatches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In this commit, we fix an issue that was recently introduced to the way we handle historical dispatches for the neutrino notifier. In a recent change, we no return an error if we’re unable to actually find the transaction that spends an outpoint. If this is the case, then the outpoint is actually unspent, and we should proceed as normal. --- chainntnfs/neutrinonotify/neutrino.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chainntnfs/neutrinonotify/neutrino.go b/chainntnfs/neutrinonotify/neutrino.go index 27f6129c..a75bde2e 100644 --- a/chainntnfs/neutrinonotify/neutrino.go +++ b/chainntnfs/neutrinonotify/neutrino.go @@ -3,6 +3,7 @@ package neutrinonotify import ( "errors" "fmt" + "strings" "sync" "sync/atomic" "time" @@ -629,7 +630,7 @@ func (n *NeutrinoNotifier) RegisterSpendNtfn(outpoint *wire.OutPoint, Height: int32(heightHint), }), ) - if err != nil { + if err != nil && !strings.Contains(err.Error(), "not found") { return nil, err }