Skip to content

Commit 03316cd

Browse files
committed
Remove trivial assertions in LocalCommitmentTransaction fns
We don't need to assert that transaction structure is what we expect when the transaction is created by a function twenty lines up in the same file.
1 parent 92c0698 commit 03316cd

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

lightning/src/ln/chan_utils.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -614,8 +614,6 @@ impl LocalCommitmentTransaction {
614614
for this_htlc in self.per_htlc.iter() {
615615
if this_htlc.0.transaction_output_index.is_some() {
616616
let htlc_tx = build_htlc_transaction(&txid, self.feerate_per_kw, local_csv, &this_htlc.0, &self.local_keys.a_delayed_payment_key, &self.local_keys.revocation_key);
617-
assert_eq!(htlc_tx.input.len(), 1);
618-
assert_eq!(htlc_tx.input[0].witness.len(), 0);
619617

620618
let htlc_redeemscript = get_htlc_redeemscript_with_explicit_keys(&this_htlc.0, &self.local_keys.a_htlc_key, &self.local_keys.b_htlc_key, &self.local_keys.revocation_key);
621619

@@ -642,8 +640,6 @@ impl LocalCommitmentTransaction {
642640
// Channel should have checked that we have a remote signature for this HTLC at
643641
// creation, and we should have a sensible htlc transaction:
644642
assert!(this_htlc.1.is_some());
645-
assert_eq!(htlc_tx.input.len(), 1);
646-
assert_eq!(htlc_tx.input[0].witness.len(), 0);
647643

648644
let htlc_redeemscript = get_htlc_redeemscript_with_explicit_keys(&this_htlc.0, &self.local_keys.a_htlc_key, &self.local_keys.b_htlc_key, &self.local_keys.revocation_key);
649645

0 commit comments

Comments
 (0)