Skip to content

Commit 8ec11cc

Browse files
committed
f assert htlc resolution tx is the htlc-output-spending tx
1 parent 438a92c commit 8ec11cc

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
@@ -1491,9 +1491,8 @@ impl<Signer: Sign> ChannelMonitor<Signer> {
14911491
}
14921492
let htlc_resolved = us.htlcs_resolved_on_chain.iter()
14931493
.find(|v| if v.commitment_tx_output_idx == htlc_commitment_tx_output_idx {
1494-
if v.resolving_txid != confirmed_txid {
1495-
htlc_spend_txid_opt = v.resolving_txid;
1496-
}
1494+
debug_assert_ne!(v.resolving_txid, confirmed_txid);
1495+
htlc_spend_txid_opt = v.resolving_txid;
14971496
true
14981497
} else { false });
14991498
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)