@@ -2468,7 +2468,7 @@ fn revoked_output_claim() {
24682468 mine_transaction ( & nodes[ 1 ] , & revoked_local_txn[ 0 ] ) ;
24692469 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
24702470 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 ( ) ;
24722472 assert_eq ! ( node_txn. len( ) , 2 ) ; // ChannelMonitor: justice tx against revoked to_local output, ChannelManager: local commitment tx
24732473
24742474 check_spends ! ( node_txn[ 0 ] , revoked_local_txn[ 0 ] ) ;
@@ -4632,7 +4632,7 @@ fn test_claim_sizeable_push_msat() {
46324632 check_closed_broadcast ! ( nodes[ 1 ] , true ) ;
46334633 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
46344634 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 ( ) ;
46364636 assert_eq ! ( node_txn. len( ) , 1 ) ;
46374637 check_spends ! ( node_txn[ 0 ] , chan. 3 ) ;
46384638 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() {
47004700 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
47014701 check_closed_event ! ( nodes[ 1 ] , 1 , ClosureReason :: CommitmentTxConfirmed ) ;
47024702
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 ( ) ;
47044704 mine_transaction ( & nodes[ 1 ] , & node_txn[ 0 ] ) ;
47054705 connect_blocks ( & nodes[ 1 ] , ANTI_REORG_DELAY - 1 ) ;
47064706
@@ -4743,7 +4743,7 @@ fn test_static_spendable_outputs_preimage_tx() {
47434743 }
47444744
47454745 // 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
47474747 assert_eq ! ( node_txn. len( ) , 3 ) ;
47484748 check_spends ! ( node_txn[ 0 ] , commitment_tx[ 0 ] ) ;
47494749 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() {
48294829 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
48304830 check_closed_event ! ( nodes[ 1 ] , 1 , ClosureReason :: CommitmentTxConfirmed ) ;
48314831
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 ( ) ;
48334833 assert_eq ! ( node_txn. len( ) , 2 ) ;
48344834 assert_eq ! ( node_txn[ 0 ] . input. len( ) , 2 ) ;
48354835 check_spends ! ( node_txn[ 0 ] , revoked_local_txn[ 0 ] ) ;
@@ -4882,7 +4882,7 @@ fn test_static_spendable_outputs_justice_tx_revoked_htlc_timeout_tx() {
48824882 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
48834883 check_closed_event ! ( nodes[ 1 ] , 1 , ClosureReason :: CommitmentTxConfirmed ) ;
48844884
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 ( ) ;
48864886 assert_eq ! ( node_txn. len( ) , 3 ) ; // ChannelMonitor: bogus justice tx, justice tx on revoked outputs, ChannelManager: local commitment tx
48874887 // The first transaction generated is bogus - it spends both outputs of revoked_local_txn[0]
48884888 // 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() {
49384938 check_closed_broadcast ! ( nodes[ 1 ] , true ) ;
49394939 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
49404940 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 ( ) ;
49424942
49434943 assert_eq ! ( revoked_htlc_txn. len( ) , 2 ) ;
49444944 assert_eq ! ( revoked_htlc_txn[ 0 ] . input. len( ) , 1 ) ;
@@ -4956,7 +4956,7 @@ fn test_static_spendable_outputs_justice_tx_revoked_htlc_success_tx() {
49564956 check_added_monitors ! ( nodes[ 0 ] , 1 ) ;
49574957 check_closed_event ! ( nodes[ 0 ] , 1 , ClosureReason :: CommitmentTxConfirmed ) ;
49584958
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 ( ) ;
49604960 assert_eq ! ( node_txn. len( ) , 3 ) ; // ChannelMonitor: justice tx on revoked commitment, justice tx on revoked HTLC-success, ChannelManager: local commitment tx
49614961
49624962 // 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() {
50975097 let commitment_tx = get_local_commitment_txn ! ( nodes[ 0 ] , chan_1. 2 ) ;
50985098 mine_transaction ( & nodes[ 1 ] , & commitment_tx[ 0 ] ) ;
50995099 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 ( ) ;
51015101 // ChannelMonitor: HTLC-Success tx, ChannelManager: local commitment tx + HTLC-Success tx
51025102 assert_eq ! ( b_txn. len( ) , 3 ) ;
51035103 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
86688668 } ;
86698669 let header = BlockHeader { version : 0x20000000 , prev_blockhash : nodes[ 1 ] . best_block_hash ( ) , merkle_root : Default :: default ( ) , time : 42 , bits : 42 , nonce : 42 } ;
86708670 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 ( ) ;
86728672 if broadcast_alice {
86738673 check_closed_broadcast ! ( nodes[ 1 ] , true ) ;
86748674 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
0 commit comments