@@ -2468,7 +2468,7 @@ fn revoked_output_claim() {
2468
2468
mine_transaction ( & nodes[ 1 ] , & revoked_local_txn[ 0 ] ) ;
2469
2469
check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
2470
2470
check_closed_event ! ( nodes[ 1 ] , 1 , ClosureReason :: CommitmentTxConfirmed ) ;
2471
- let node_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) ;
2471
+ let node_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) . clone ( ) ;
2472
2472
assert_eq ! ( node_txn. len( ) , 2 ) ; // ChannelMonitor: justice tx against revoked to_local output, ChannelManager: local commitment tx
2473
2473
2474
2474
check_spends ! ( node_txn[ 0 ] , revoked_local_txn[ 0 ] ) ;
@@ -4632,7 +4632,7 @@ fn test_claim_sizeable_push_msat() {
4632
4632
check_closed_broadcast ! ( nodes[ 1 ] , true ) ;
4633
4633
check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
4634
4634
check_closed_event ! ( nodes[ 1 ] , 1 , ClosureReason :: HolderForceClosed ) ;
4635
- let node_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) ;
4635
+ let node_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) . clone ( ) ;
4636
4636
assert_eq ! ( node_txn. len( ) , 1 ) ;
4637
4637
check_spends ! ( node_txn[ 0 ] , chan. 3 ) ;
4638
4638
assert_eq ! ( node_txn[ 0 ] . output. len( ) , 2 ) ; // We can't force trimming of to_remote output as channel_reserve_satoshis block us to do so at channel opening
@@ -4700,7 +4700,7 @@ fn test_claim_on_remote_revoked_sizeable_push_msat() {
4700
4700
check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
4701
4701
check_closed_event ! ( nodes[ 1 ] , 1 , ClosureReason :: CommitmentTxConfirmed ) ;
4702
4702
4703
- let node_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) ;
4703
+ let node_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) . clone ( ) ;
4704
4704
mine_transaction ( & nodes[ 1 ] , & node_txn[ 0 ] ) ;
4705
4705
connect_blocks ( & nodes[ 1 ] , ANTI_REORG_DELAY - 1 ) ;
4706
4706
@@ -4743,7 +4743,7 @@ fn test_static_spendable_outputs_preimage_tx() {
4743
4743
}
4744
4744
4745
4745
// Check B's monitor was able to send back output descriptor event for preimage tx on A's commitment tx
4746
- let node_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) ; // ChannelManager : 2 (local commitment tx + HTLC-Success), ChannelMonitor: preimage tx
4746
+ let node_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) . clone ( ) ; // ChannelManager : 2 (local commitment tx + HTLC-Success), ChannelMonitor: preimage tx
4747
4747
assert_eq ! ( node_txn. len( ) , 3 ) ;
4748
4748
check_spends ! ( node_txn[ 0 ] , commitment_tx[ 0 ] ) ;
4749
4749
assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
@@ -4829,7 +4829,7 @@ fn test_static_spendable_outputs_justice_tx_revoked_commitment_tx() {
4829
4829
check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
4830
4830
check_closed_event ! ( nodes[ 1 ] , 1 , ClosureReason :: CommitmentTxConfirmed ) ;
4831
4831
4832
- let node_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) ;
4832
+ let node_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) . clone ( ) ;
4833
4833
assert_eq ! ( node_txn. len( ) , 2 ) ;
4834
4834
assert_eq ! ( node_txn[ 0 ] . input. len( ) , 2 ) ;
4835
4835
check_spends ! ( node_txn[ 0 ] , revoked_local_txn[ 0 ] ) ;
@@ -4882,7 +4882,7 @@ fn test_static_spendable_outputs_justice_tx_revoked_htlc_timeout_tx() {
4882
4882
check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
4883
4883
check_closed_event ! ( nodes[ 1 ] , 1 , ClosureReason :: CommitmentTxConfirmed ) ;
4884
4884
4885
- let node_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) ;
4885
+ let node_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) . clone ( ) ;
4886
4886
assert_eq ! ( node_txn. len( ) , 3 ) ; // ChannelMonitor: bogus justice tx, justice tx on revoked outputs, ChannelManager: local commitment tx
4887
4887
// The first transaction generated is bogus - it spends both outputs of revoked_local_txn[0]
4888
4888
// including the one already spent by revoked_htlc_txn[1]. That's OK, we'll spend with valid
@@ -4938,7 +4938,7 @@ fn test_static_spendable_outputs_justice_tx_revoked_htlc_success_tx() {
4938
4938
check_closed_broadcast ! ( nodes[ 1 ] , true ) ;
4939
4939
check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
4940
4940
check_closed_event ! ( nodes[ 1 ] , 1 , ClosureReason :: CommitmentTxConfirmed ) ;
4941
- let revoked_htlc_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) ;
4941
+ let revoked_htlc_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) . clone ( ) ;
4942
4942
4943
4943
assert_eq ! ( revoked_htlc_txn. len( ) , 2 ) ;
4944
4944
assert_eq ! ( revoked_htlc_txn[ 0 ] . input. len( ) , 1 ) ;
@@ -4956,7 +4956,7 @@ fn test_static_spendable_outputs_justice_tx_revoked_htlc_success_tx() {
4956
4956
check_added_monitors ! ( nodes[ 0 ] , 1 ) ;
4957
4957
check_closed_event ! ( nodes[ 0 ] , 1 , ClosureReason :: CommitmentTxConfirmed ) ;
4958
4958
4959
- let node_txn = nodes[ 0 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) ;
4959
+ let node_txn = nodes[ 0 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) . clone ( ) ;
4960
4960
assert_eq ! ( node_txn. len( ) , 3 ) ; // ChannelMonitor: justice tx on revoked commitment, justice tx on revoked HTLC-success, ChannelManager: local commitment tx
4961
4961
4962
4962
// The first transaction generated is bogus - it spends both outputs of revoked_local_txn[0]
@@ -5097,7 +5097,7 @@ fn test_onchain_to_onchain_claim() {
5097
5097
let commitment_tx = get_local_commitment_txn ! ( nodes[ 0 ] , chan_1. 2 ) ;
5098
5098
mine_transaction ( & nodes[ 1 ] , & commitment_tx[ 0 ] ) ;
5099
5099
check_closed_event ! ( nodes[ 1 ] , 1 , ClosureReason :: CommitmentTxConfirmed ) ;
5100
- let b_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) ;
5100
+ let b_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) . clone ( ) ;
5101
5101
// ChannelMonitor: HTLC-Success tx, ChannelManager: local commitment tx + HTLC-Success tx
5102
5102
assert_eq ! ( b_txn. len( ) , 3 ) ;
5103
5103
check_spends ! ( b_txn[ 1 ] , chan_1. 3 ) ;
@@ -8668,7 +8668,7 @@ fn do_test_onchain_htlc_settlement_after_close(broadcast_alice: bool, go_onchain
8668
8668
} ;
8669
8669
let header = BlockHeader { version : 0x20000000 , prev_blockhash : nodes[ 1 ] . best_block_hash ( ) , merkle_root : Default :: default ( ) , time : 42 , bits : 42 , nonce : 42 } ;
8670
8670
connect_block ( & nodes[ 1 ] , & Block { header, txdata : vec ! [ txn_to_broadcast[ 0 ] . clone( ) ] } ) ;
8671
- let mut bob_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) ;
8671
+ let mut bob_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) . clone ( ) ;
8672
8672
if broadcast_alice {
8673
8673
check_closed_broadcast ! ( nodes[ 1 ] , true ) ;
8674
8674
check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
0 commit comments