X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fpayment_tests.rs;h=d2e5583fe5607cdf2712121387dce9bcc235c989;hb=62236c70d863bf9456e28a3a1ba784b2e4680a88;hp=dcad041f49cd78c2214260ff9a542b41c32b2e27;hpb=a82fb6285692edbfba7dee4a26da545298eb32d0;p=rust-lightning diff --git a/lightning/src/ln/payment_tests.rs b/lightning/src/ln/payment_tests.rs index dcad041f..d2e5583f 100644 --- a/lightning/src/ln/payment_tests.rs +++ b/lightning/src/ln/payment_tests.rs @@ -508,13 +508,8 @@ fn do_retry_with_no_persist(confirm_before_reload: bool) { expect_payment_sent!(nodes[0], payment_preimage_1); connect_blocks(&nodes[0], TEST_FINAL_CLTV*4 + 20); let as_htlc_timeout_txn = nodes[0].tx_broadcaster.txn_broadcasted.lock().unwrap().split_off(0); - assert_eq!(as_htlc_timeout_txn.len(), 3); - let (first_htlc_timeout_tx, second_htlc_timeout_tx) = if as_htlc_timeout_txn[0] == as_commitment_tx { - (&as_htlc_timeout_txn[1], &as_htlc_timeout_txn[2]) - } else { - assert_eq!(as_htlc_timeout_txn[2], as_commitment_tx); - (&as_htlc_timeout_txn[0], &as_htlc_timeout_txn[1]) - }; + assert_eq!(as_htlc_timeout_txn.len(), 2); + let (first_htlc_timeout_tx, second_htlc_timeout_tx) = (&as_htlc_timeout_txn[0], &as_htlc_timeout_txn[1]); check_spends!(first_htlc_timeout_tx, as_commitment_tx); check_spends!(second_htlc_timeout_tx, as_commitment_tx); if first_htlc_timeout_tx.input[0].previous_output == bs_htlc_claim_txn[0].input[0].previous_output {