Skip to content

Commit 3023e2f

Browse files
committed
Don't process alternative funding confirmations duplicatively
Otherwise we'll hit an assert that we do not already have an alternative funding confirmation when reprocessing the transaction.
1 parent ecce859 commit 3023e2f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5164,6 +5164,10 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
51645164
let txid = tx.compute_txid();
51655165
log_trace!(logger, "Transaction {} confirmed in block {}", txid , block_hash);
51665166
// If a transaction has already been confirmed, ensure we don't bother processing it duplicatively.
5167+
if self.alternative_funding_confirmed.map(|(alternative_funding_txid, _)| alternative_funding_txid == txid).unwrap_or(false) {
5168+
log_debug!(logger, "Skipping redundant processing of funding-spend tx {} as it was previously confirmed", txid);
5169+
continue 'tx_iter;
5170+
}
51675171
if Some(txid) == self.funding_spend_confirmed {
51685172
log_debug!(logger, "Skipping redundant processing of funding-spend tx {} as it was previously confirmed", txid);
51695173
continue 'tx_iter;

0 commit comments

Comments
 (0)