chainntnfs: return an error when witness stack is empty

This commit adds a check when receiving transactions from
`BitcoindClient` so an error is returned when empty witness is found.
This commit is contained in:
yyforyongyu committed 2023-10-31 01:44:43 +08:00
1 parent 971d3d8d9c
commit 28c3c835bf
7 files changed
+139 -14

No files matched your search

+6 -1
View File
@@ -536,7 +536,12 @@ func (b *BtcdNotifier) handleRelevantTx(tx *btcutil.Tx,
// If this is a mempool spend, we'll ask the mempool notifier to hanlde
// it.
if mempool {
b.memNotifier.ProcessRelevantSpendTx(tx)
err := b.memNotifier.ProcessRelevantSpendTx(tx)
if err != nil {
chainntnfs.Log.Errorf("Unable to process transaction "+
"%v: %v", tx.Hash(), err)
}
return
}