sweepbatcher: check of conf notification has tx

This commit is contained in:
Boris Nagaev 2025-06-24 13:06:58 -03:00
parent 1794aa21e5
commit 0dc5d9eb69
No known key found for this signature in database

View file

@ -2059,6 +2059,10 @@ func (b *batch) handleConf(ctx context.Context,
conf *chainntnfs.TxConfirmation) error {
spendTx := conf.Tx
if spendTx == nil {
return fmt.Errorf("confirmation doesn't have spendTx, "+
"height=%d, TxIndex=%d", conf.BlockHeight, conf.TxIndex)
}
txHash := spendTx.TxHash()
if b.batchTxid == nil || *b.batchTxid != txHash {
b.Warnf("Mismatch of batch txid: tx in spend notification had "+