@@ -277,7 +277,7 @@ fn do_test_simple_monitor_temporary_update_fail(disconnect: bool) {
277277 } ;
278278 nodes[ 0 ] . node . force_close_broadcasting_latest_txn ( & channel_id, & node_b_id, message) . unwrap ( ) ;
279279 check_added_monitors ( & nodes[ 0 ] , 1 ) ;
280- check_closed_broadcast ! ( nodes[ 0 ] , true ) ;
280+ check_closed_broadcast ( & nodes[ 0 ] , 1 , true ) ;
281281
282282 // TODO: Once we hit the chain with the failure transaction we should check that we get a
283283 // PaymentPathFailed event
@@ -1382,9 +1382,9 @@ fn raa_no_response_awaiting_raa_state() {
13821382 let ( route, payment_hash_1, payment_preimage_1, payment_secret_1) =
13831383 get_route_and_payment_hash ! ( nodes[ 0 ] , nodes[ 1 ] , 1000000 ) ;
13841384 let ( payment_preimage_2, payment_hash_2, payment_secret_2) =
1385- get_payment_preimage_hash ! ( nodes[ 1 ] ) ;
1385+ get_payment_preimage_hash ( & nodes[ 1 ] , None , None ) ;
13861386 let ( payment_preimage_3, payment_hash_3, payment_secret_3) =
1387- get_payment_preimage_hash ! ( nodes[ 1 ] ) ;
1387+ get_payment_preimage_hash ( & nodes[ 1 ] , None , None ) ;
13881388
13891389 // Queue up two payments - one will be delivered right away, one immediately goes into the
13901390 // holding cell as nodes[0] is AwaitingRAA. Ultimately this allows us to deliver an RAA
@@ -1872,7 +1872,7 @@ fn test_monitor_update_fail_claim() {
18721872 do_commitment_signed_dance ( & nodes[ 1 ] , & nodes[ 2 ] , & payment_event. commitment_msg , false , true ) ;
18731873 expect_htlc_failure_conditions ( nodes[ 1 ] . node . get_and_clear_pending_events ( ) , & [ ] ) ;
18741874
1875- let ( _, payment_hash_3, payment_secret_3) = get_payment_preimage_hash ! ( nodes[ 0 ] ) ;
1875+ let ( _, payment_hash_3, payment_secret_3) = get_payment_preimage_hash ( & nodes[ 0 ] , None , None ) ;
18761876 let id_3 = PaymentId ( payment_hash_3. 0 ) ;
18771877 let onion_3 = RecipientOnionFields :: secret_only ( payment_secret_3) ;
18781878 nodes[ 2 ] . node . send_payment_with_route ( route, payment_hash_3, onion_3, id_3) . unwrap ( ) ;
@@ -2509,7 +2509,7 @@ fn test_fail_htlc_on_broadcast_after_claim() {
25092509 mine_transaction ( & nodes[ 1 ] , & bs_txn[ 0 ] ) ;
25102510 let reason = ClosureReason :: CommitmentTxConfirmed ;
25112511 check_closed_event ( & nodes[ 1 ] , 1 , reason, & [ node_c_id] , 100000 ) ;
2512- check_closed_broadcast ! ( nodes[ 1 ] , true ) ;
2512+ check_closed_broadcast ( & nodes[ 1 ] , 1 , true ) ;
25132513 connect_blocks ( & nodes[ 1 ] , ANTI_REORG_DELAY - 1 ) ;
25142514 check_added_monitors ( & nodes[ 1 ] , 1 ) ;
25152515 expect_and_process_pending_htlcs_and_htlc_handling_failed (
@@ -2663,7 +2663,7 @@ fn do_channel_holding_cell_serialize(disconnect: bool, reload_a: bool) {
26632663 let ( route, payment_hash_1, payment_preimage_1, payment_secret_1) =
26642664 get_route_and_payment_hash ! ( & nodes[ 0 ] , nodes[ 1 ] , 100000 ) ;
26652665 let ( payment_preimage_2, payment_hash_2, payment_secret_2) =
2666- get_payment_preimage_hash ! ( & nodes[ 1 ] ) ;
2666+ get_payment_preimage_hash ( & nodes[ 1 ] , None , None ) ;
26672667
26682668 // Do a really complicated dance to get an HTLC into the holding cell, with
26692669 // MonitorUpdateInProgress set but AwaitingRemoteRevoke unset. When this test was written, any
@@ -3048,11 +3048,11 @@ fn test_temporary_error_during_shutdown() {
30483048 node_b_id,
30493049 & get_event_msg ! ( nodes[ 1 ] , MessageSendEvent :: SendClosingSigned , node_a_id) ,
30503050 ) ;
3051- let ( _, closing_signed_a) = get_closing_signed_broadcast ! ( nodes[ 0 ] . node , node_b_id) ;
3051+ let ( _, closing_signed_a) = get_closing_signed_broadcast ( & nodes[ 0 ] , node_b_id) ;
30523052 let txn_a = nodes[ 0 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) . split_off ( 0 ) ;
30533053
30543054 nodes[ 1 ] . node . handle_closing_signed ( node_a_id, & closing_signed_a. unwrap ( ) ) ;
3055- let ( _, none_b) = get_closing_signed_broadcast ! ( nodes[ 1 ] . node , node_a_id) ;
3055+ let ( _, none_b) = get_closing_signed_broadcast ( & nodes[ 1 ] , node_a_id) ;
30563056 assert ! ( none_b. is_none( ) ) ;
30573057 let txn_b = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) . split_off ( 0 ) ;
30583058
@@ -4043,7 +4043,7 @@ fn do_test_reload_mon_update_completion_actions(close_during_reload: bool) {
40434043 } ;
40444044 nodes[ 0 ] . node . force_close_broadcasting_latest_txn ( & chan_id_ab, & node_b_id, msg) . unwrap ( ) ;
40454045 check_added_monitors ( & nodes[ 0 ] , 1 ) ;
4046- check_closed_broadcast ! ( nodes[ 0 ] , true ) ;
4046+ check_closed_broadcast ( & nodes[ 0 ] , 1 , true ) ;
40474047 check_closed_event ( & nodes[ 0 ] , 1 , reason, & [ node_b_id] , 100_000 ) ;
40484048 let as_closing_tx = nodes[ 0 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) . split_off ( 0 ) ;
40494049 mine_transaction_without_consistency_checks ( & nodes[ 1 ] , & as_closing_tx[ 0 ] ) ;
@@ -4494,13 +4494,13 @@ fn test_claim_to_closed_channel_blocks_forwarded_preimage_removal() {
44944494 check_added_monitors ( & nodes[ 0 ] , 1 ) ;
44954495 let a_reason = ClosureReason :: HolderForceClosed { broadcasted_latest_txn : Some ( true ) , message } ;
44964496 check_closed_event ( & nodes[ 0 ] , 1 , a_reason, & [ node_b_id] , 1000000 ) ;
4497- check_closed_broadcast ! ( nodes[ 0 ] , true ) ;
4497+ check_closed_broadcast ( & nodes[ 0 ] , 1 , true ) ;
44984498
44994499 let as_commit_tx = nodes[ 0 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) . split_off ( 0 ) ;
45004500 assert_eq ! ( as_commit_tx. len( ) , 1 ) ;
45014501
45024502 mine_transaction ( & nodes[ 1 ] , & as_commit_tx[ 0 ] ) ;
4503- check_closed_broadcast ! ( nodes[ 1 ] , true ) ;
4503+ check_closed_broadcast ( & nodes[ 1 ] , 1 , true ) ;
45044504 check_added_monitors ( & nodes[ 1 ] , 1 ) ;
45054505 let b_reason = ClosureReason :: CommitmentTxConfirmed ;
45064506 check_closed_event ( & nodes[ 1 ] , 1 , b_reason, & [ node_a_id] , 1000000 ) ;
@@ -4572,13 +4572,13 @@ fn test_claim_to_closed_channel_blocks_claimed_event() {
45724572 check_added_monitors ( & nodes[ 0 ] , 1 ) ;
45734573 let a_reason = ClosureReason :: HolderForceClosed { broadcasted_latest_txn : Some ( true ) , message } ;
45744574 check_closed_event ( & nodes[ 0 ] , 1 , a_reason, & [ node_b_id] , 1000000 ) ;
4575- check_closed_broadcast ! ( nodes[ 0 ] , true ) ;
4575+ check_closed_broadcast ( & nodes[ 0 ] , 1 , true ) ;
45764576
45774577 let as_commit_tx = nodes[ 0 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) . split_off ( 0 ) ;
45784578 assert_eq ! ( as_commit_tx. len( ) , 1 ) ;
45794579
45804580 mine_transaction ( & nodes[ 1 ] , & as_commit_tx[ 0 ] ) ;
4581- check_closed_broadcast ! ( nodes[ 1 ] , true ) ;
4581+ check_closed_broadcast ( & nodes[ 1 ] , 1 , true ) ;
45824582 check_added_monitors ( & nodes[ 1 ] , 1 ) ;
45834583 let b_reason = ClosureReason :: CommitmentTxConfirmed ;
45844584 check_closed_event ( & nodes[ 1 ] , 1 , b_reason, & [ node_a_id] , 1000000 ) ;
@@ -5099,7 +5099,8 @@ fn test_mpp_claim_to_holding_cell() {
50995099 send_along_route_with_secret ( & nodes[ 0 ] , route, paths, 500_000 , paymnt_hash_1, payment_secret) ;
51005100
51015101 // Put the C <-> D channel into AwaitingRaa
5102- let ( preimage_2, paymnt_hash_2, payment_secret_2) = get_payment_preimage_hash ! ( nodes[ 3 ] ) ;
5102+ let ( preimage_2, paymnt_hash_2, payment_secret_2) =
5103+ get_payment_preimage_hash ( & nodes[ 3 ] , None , None ) ;
51035104 let onion = RecipientOnionFields :: secret_only ( payment_secret_2) ;
51045105 let id = PaymentId ( [ 42 ; 32 ] ) ;
51055106 let pay_params = PaymentParameters :: from_node_id ( node_d_id, TEST_FINAL_CLTV ) ;
0 commit comments