Skip to content

Commit 5fa8a7c

Browse files
committed
f assert htlc resolution tx is the htlc-output-spending tx
1 parent 0acaca7 commit 5fa8a7c

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
@@ -1486,9 +1486,8 @@ impl<Signer: Sign> ChannelMonitor<Signer> {
14861486
}
14871487
let htlc_resolved = us.htlcs_resolved_on_chain.iter()
14881488
.find(|v| if v.commitment_tx_output_idx == htlc_commitment_tx_output_idx {
1489-
if v.resolving_txid != confirmed_txid {
1490-
htlc_spend_txid_opt = v.resolving_txid;
1491-
}
1489+
debug_assert_ne!(v.resolving_txid, confirmed_txid);
1490+
htlc_spend_txid_opt = v.resolving_txid;
14921491
true
14931492
} else { false });
14941493
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)