Skip to content

Commit 59da056

Browse files
committed
sweepbatcher: check of conf notification has tx
1 parent 70dd1a7 commit 59da056

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
@@ -2060,6 +2060,10 @@ func (b *batch) handleConf(ctx context.Context,
20602060
conf *chainntnfs.TxConfirmation) error {
20612061

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

0 commit comments

Comments
 (0)