Skip to content

Commit 4fb838a

Browse files
committed
f assert htlc resolution tx is the htlc-output-spending tx
1 parent a22ed83 commit 4fb838a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,9 +1474,8 @@ impl<Signer: Sign> ChannelMonitor<Signer> {
14741474
}
14751475
let htlc_resolved = us.htlcs_resolved_on_chain.iter()
14761476
.find(|v| if v.commitment_tx_output_idx == htlc_commitment_tx_output_idx {
1477-
if v.resolving_txid != confirmed_txid {
1478-
htlc_spend_txid_opt = v.resolving_txid;
1479-
}
1477+
debug_assert_ne!(v.resolving_txid, confirmed_txid);
1478+
htlc_spend_txid_opt = v.resolving_txid;
14801479
true
14811480
} else { false });
14821481
debug_assert!(htlc_update_pending.is_some() as u8 + htlc_spend_pending.is_some() as u8 + htlc_resolved.is_some() as u8 <= 1);

0 commit comments

Comments
 (0)