chainntnfs/neutrinonotify: fix regression for historical spend dispatches

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.
This commit is contained in:
Olaoluwa Osuntokun 2018-02-02 17:59:11 -08:00
parent 609525f0e8
commit ddf4715e3c
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21
1 changed files with 2 additions and 1 deletions

View File

@ -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
}