mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 06:57:53 +01:00
Make test_durable_preimages_on_closed_channel
more robust
Makes `test_durable_preimages_on_closed_channel` more robust against changes to the order in which transactions are broadcast.
This commit is contained in:
parent
2d6720e7e2
commit
aba57bbc07
1 changed files with 1 additions and 1 deletions
|
@ -3288,7 +3288,7 @@ fn do_test_durable_preimages_on_closed_channel(close_chans_before_reload: bool,
|
|||
// Finally, check that B created a payment preimage transaction and close out the payment.
|
||||
let bs_txn = nodes[1].tx_broadcaster.txn_broadcasted.lock().unwrap().split_off(0);
|
||||
assert_eq!(bs_txn.len(), if close_chans_before_reload && !close_only_a { 2 } else { 1 });
|
||||
let bs_preimage_tx = &bs_txn[0];
|
||||
let bs_preimage_tx = bs_txn.iter().find(|tx| tx.input[0].previous_output.txid == as_closing_tx[0].compute_txid()).unwrap();
|
||||
check_spends!(bs_preimage_tx, as_closing_tx[0]);
|
||||
|
||||
if !close_chans_before_reload {
|
||||
|
|
Loading…
Add table
Reference in a new issue