Skip to content

Commit 0dc5d9e

Browse files
committed
sweepbatcher: check of conf notification has tx
1 parent 1794aa2 commit 0dc5d9e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sweepbatcher/sweep_batch.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,6 +2059,10 @@ func (b *batch) handleConf(ctx context.Context,
20592059
conf *chainntnfs.TxConfirmation) error {
20602060

20612061
spendTx := conf.Tx
2062+
if spendTx == nil {
2063+
return fmt.Errorf("confirmation doesn't have spendTx, "+
2064+
"height=%d, TxIndex=%d", conf.BlockHeight, conf.TxIndex)
2065+
}
20622066
txHash := spendTx.TxHash()
20632067
if b.batchTxid == nil || *b.batchTxid != txHash {
20642068
b.Warnf("Mismatch of batch txid: tx in spend notification had "+

0 commit comments

Comments
 (0)