X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Ffunctional_tests.rs;h=17f8e1597b7c0b2c34f064656c8ebf3de91e0a50;hb=02ae5cb9a7b66d17c23d9cdc10d7cfa659ea4450;hp=f2b05b6e1ede4fa05d1fd8eee35679f82e0c88e6;hpb=b8ed4d2608e32128dd5a1dee92911638a4301138;p=rust-lightning diff --git a/lightning/src/ln/functional_tests.rs b/lightning/src/ln/functional_tests.rs index f2b05b6e..17f8e159 100644 --- a/lightning/src/ln/functional_tests.rs +++ b/lightning/src/ln/functional_tests.rs @@ -2991,9 +2991,9 @@ fn do_test_htlc_on_chain_timeout(connect_style: ConnectStyle) { if nodes[1].connect_style.borrow().skips_blocks() { assert_eq!(txn.len(), 1); } else { - assert_eq!(txn.len(), 2); // Extra rebroadcast of timeout transaction + assert_eq!(txn.len(), 3); // Two extra fee bumps for timeout transaction } - check_spends!(txn[0], commitment_tx[0]); + txn.iter().for_each(|tx| check_spends!(tx, commitment_tx[0])); assert_eq!(txn[0].clone().input[0].witness.last().unwrap().len(), ACCEPTED_HTLC_SCRIPT_WEIGHT); txn.remove(0) }; @@ -3461,7 +3461,7 @@ fn test_htlc_ignore_latest_remote_commitment() { let node_txn = nodes[0].tx_broadcaster.txn_broadcasted.lock().unwrap().split_off(0); assert_eq!(node_txn.len(), 3); - assert_eq!(node_txn[0], node_txn[1]); + assert_eq!(node_txn[0].txid(), node_txn[1].txid()); let mut header = BlockHeader { version: 0x20000000, prev_blockhash: nodes[1].best_block_hash(), merkle_root: TxMerkleNode::all_zeros(), time: 42, bits: 42, nonce: 42 }; connect_block(&nodes[1], &Block { header, txdata: vec![node_txn[0].clone(), node_txn[1].clone()]}); @@ -7510,7 +7510,7 @@ fn test_bump_penalty_txn_on_remote_commitment() { assert_ne!(feerate_preimage, 0); // After exhaustion of height timer, new bumped claim txn should have been broadcast, check it - connect_blocks(&nodes[1], 15); + connect_blocks(&nodes[1], 1); { let mut node_txn = nodes[1].tx_broadcaster.txn_broadcasted.lock().unwrap(); assert_eq!(node_txn.len(), 1); @@ -9248,7 +9248,7 @@ fn do_test_tx_confirmed_skipping_blocks_immediate_broadcast(test_height_before_t // We should broadcast an HTLC transaction spending our funding transaction first let spending_txn = nodes[1].tx_broadcaster.txn_broadcasted.lock().unwrap().split_off(0); assert_eq!(spending_txn.len(), 2); - assert_eq!(spending_txn[0], node_txn[0]); + assert_eq!(spending_txn[0].txid(), node_txn[0].txid()); check_spends!(spending_txn[1], node_txn[0]); // We should also generate a SpendableOutputs event with the to_self output (as its // timelock is up).