From 0dc5d9eb69e49d1990339f908b0240da1abec307 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Tue, 24 Jun 2025 13:06:58 -0300 Subject: [PATCH] sweepbatcher: check of conf notification has tx --- sweepbatcher/sweep_batch.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sweepbatcher/sweep_batch.go b/sweepbatcher/sweep_batch.go index 08ed8299..933077fc 100644 --- a/sweepbatcher/sweep_batch.go +++ b/sweepbatcher/sweep_batch.go @@ -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 "+