chainntnfs: patch debug logs and fix StartHeight
Make sure we patch the `StartHeight` for btcd notifier.
This commit is contained in:
2 files changed
+14
-4
No files matched your search
@@ -833,8 +833,12 @@ func (b *BitcoindNotifier) RegisterSpendNtfn(outpoint *wire.OutPoint,
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if uint32(blockHeight) > ntfn.HistoricalDispatch.StartHeight {
|
||||
ntfn.HistoricalDispatch.StartHeight = uint32(blockHeight)
|
||||
spentHeight := uint32(blockHeight)
|
||||
chainntnfs.Log.Debugf("Outpoint(%v) has spent at height %v",
|
||||
outpoint, spentHeight)
|
||||
|
||||
if spentHeight > ntfn.HistoricalDispatch.StartHeight {
|
||||
ntfn.HistoricalDispatch.StartHeight = spentHeight
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user