@@ -126,15 +126,15 @@ pub fn fail_blinded_htlc_backwards(
126126 expect_payment_failed_conditions ( & nodes[ 0 ] , payment_hash, false , payment_failed_conditions) ;
127127 } ,
128128 i if i <= intro_node_idx => {
129- let unblinded_node_updates = get_htlc_update_msgs ! ( nodes[ i] , nodes[ i-1 ] . node. get_our_node_id( ) ) ;
129+ let unblinded_node_updates = get_htlc_update_msgs ( & nodes[ i] , & nodes[ i-1 ] . node . get_our_node_id ( ) ) ;
130130 assert_eq ! ( unblinded_node_updates. update_fail_htlcs. len( ) , 1 ) ;
131131 nodes[ i-1 ] . node . handle_update_fail_htlc (
132132 nodes[ i] . node . get_our_node_id ( ) , & unblinded_node_updates. update_fail_htlcs [ i-1 ]
133133 ) ;
134134 do_commitment_signed_dance ( & nodes[ i-1 ] , & nodes[ i] , & unblinded_node_updates. commitment_signed , false , false ) ;
135135 } ,
136136 _ => {
137- let blinded_node_updates = get_htlc_update_msgs ! ( nodes[ i] , nodes[ i-1 ] . node. get_our_node_id( ) ) ;
137+ let blinded_node_updates = get_htlc_update_msgs ( & nodes[ i] , & nodes[ i-1 ] . node . get_our_node_id ( ) ) ;
138138 assert_eq ! ( blinded_node_updates. update_fail_malformed_htlcs. len( ) , 1 ) ;
139139 let update_malformed = & blinded_node_updates. update_fail_malformed_htlcs [ 0 ] ;
140140 assert_eq ! ( update_malformed. sha256_of_onion, [ 0 ; 32 ] ) ;
@@ -426,7 +426,7 @@ fn do_forward_checks_failure(check: ForwardCheckFail, intro_fails: bool) {
426426 }
427427 }
428428
429- let mut updates_0_1 = get_htlc_update_msgs ! ( nodes[ 0 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
429+ let mut updates_0_1 = get_htlc_update_msgs ( & nodes[ 0 ] , & nodes[ 1 ] . node . get_our_node_id ( ) ) ;
430430 let update_add = & mut updates_0_1. update_add_htlcs [ 0 ] ;
431431
432432 if intro_fails {
@@ -441,7 +441,7 @@ fn do_forward_checks_failure(check: ForwardCheckFail, intro_fails: bool) {
441441 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
442442
443443 if intro_fails {
444- let mut updates = get_htlc_update_msgs ! ( nodes[ 1 ] , nodes[ 0 ] . node. get_our_node_id( ) ) ;
444+ let mut updates = get_htlc_update_msgs ( & nodes[ 1 ] , & nodes[ 0 ] . node . get_our_node_id ( ) ) ;
445445 nodes[ 0 ] . node . handle_update_fail_htlc ( nodes[ 1 ] . node . get_our_node_id ( ) , & updates. update_fail_htlcs [ 0 ] ) ;
446446 do_commitment_signed_dance ( & nodes[ 0 ] , & nodes[ 1 ] , & updates. commitment_signed , false , false ) ;
447447 let failed_destination = match check {
@@ -466,7 +466,7 @@ fn do_forward_checks_failure(check: ForwardCheckFail, intro_fails: bool) {
466466 return
467467 }
468468
469- let mut updates_1_2 = get_htlc_update_msgs ! ( nodes[ 1 ] , nodes[ 2 ] . node. get_our_node_id( ) ) ;
469+ let mut updates_1_2 = get_htlc_update_msgs ( & nodes[ 1 ] , & nodes[ 2 ] . node . get_our_node_id ( ) ) ;
470470 let mut update_add = & mut updates_1_2. update_add_htlcs [ 0 ] ;
471471
472472 cause_error ! ( 2 , 3 , update_add) ;
@@ -486,7 +486,7 @@ fn do_forward_checks_failure(check: ForwardCheckFail, intro_fails: bool) {
486486 ) ;
487487 check_added_monitors ! ( nodes[ 2 ] , 1 ) ;
488488
489- let mut updates = get_htlc_update_msgs ! ( nodes[ 2 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
489+ let mut updates = get_htlc_update_msgs ( & nodes[ 2 ] , & nodes[ 1 ] . node . get_our_node_id ( ) ) ;
490490 let update_malformed = & mut updates. update_fail_malformed_htlcs [ 0 ] ;
491491 assert_eq ! ( update_malformed. failure_code, LocalHTLCFailureReason :: InvalidOnionBlinding . failure_code( ) ) ;
492492 assert_eq ! ( update_malformed. sha256_of_onion, [ 0 ; 32 ] ) ;
@@ -497,7 +497,7 @@ fn do_forward_checks_failure(check: ForwardCheckFail, intro_fails: bool) {
497497 nodes[ 1 ] . node . handle_update_fail_malformed_htlc ( nodes[ 2 ] . node . get_our_node_id ( ) , update_malformed) ;
498498 do_commitment_signed_dance ( & nodes[ 1 ] , & nodes[ 2 ] , & updates. commitment_signed , true , false ) ;
499499
500- let mut updates = get_htlc_update_msgs ! ( nodes[ 1 ] , nodes[ 0 ] . node. get_our_node_id( ) ) ;
500+ let mut updates = get_htlc_update_msgs ( & nodes[ 1 ] , & nodes[ 0 ] . node . get_our_node_id ( ) ) ;
501501 nodes[ 0 ] . node . handle_update_fail_htlc ( nodes[ 1 ] . node . get_our_node_id ( ) , & updates. update_fail_htlcs [ 0 ] ) ;
502502 do_commitment_signed_dance ( & nodes[ 0 ] , & nodes[ 1 ] , & updates. commitment_signed , false , false ) ;
503503 expect_payment_failed_conditions ( & nodes[ 0 ] , payment_hash, false ,
@@ -550,7 +550,7 @@ fn failed_backwards_to_intro_node() {
550550 expect_htlc_handling_failed_destinations ! ( nodes[ 2 ] . node. get_and_clear_pending_events( ) , & [ HTLCHandlingFailureType :: InvalidOnion ] ) ;
551551 check_added_monitors ( & nodes[ 2 ] , 1 ) ;
552552
553- let mut updates = get_htlc_update_msgs ! ( nodes[ 2 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
553+ let mut updates = get_htlc_update_msgs ( & nodes[ 2 ] , & nodes[ 1 ] . node . get_our_node_id ( ) ) ;
554554 let mut update_malformed = & mut updates. update_fail_malformed_htlcs [ 0 ] ;
555555 // Check that the final node encodes its failure correctly.
556556 assert_eq ! ( update_malformed. failure_code, LocalHTLCFailureReason :: InvalidOnionBlinding . failure_code( ) ) ;
@@ -562,7 +562,7 @@ fn failed_backwards_to_intro_node() {
562562 nodes[ 1 ] . node . handle_update_fail_malformed_htlc ( nodes[ 2 ] . node . get_our_node_id ( ) , update_malformed) ;
563563 do_commitment_signed_dance ( & nodes[ 1 ] , & nodes[ 2 ] , & updates. commitment_signed , true , false ) ;
564564
565- let mut updates = get_htlc_update_msgs ! ( nodes[ 1 ] , nodes[ 0 ] . node. get_our_node_id( ) ) ;
565+ let mut updates = get_htlc_update_msgs ( & nodes[ 1 ] , & nodes[ 0 ] . node . get_our_node_id ( ) ) ;
566566 nodes[ 0 ] . node . handle_update_fail_htlc ( nodes[ 1 ] . node . get_our_node_id ( ) , & updates. update_fail_htlcs [ 0 ] ) ;
567567 do_commitment_signed_dance ( & nodes[ 0 ] , & nodes[ 1 ] , & updates. commitment_signed , false , false ) ;
568568 expect_payment_failed_conditions ( & nodes[ 0 ] , payment_hash, false ,
@@ -658,7 +658,7 @@ fn do_forward_fail_in_process_pending_htlc_fwds(check: ProcessPendingHTLCsCheck,
658658 expect_and_process_pending_htlcs ( & nodes[ 1 ] , false ) ;
659659 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
660660
661- let mut updates_1_2 = get_htlc_update_msgs ! ( nodes[ 1 ] , nodes[ 2 ] . node. get_our_node_id( ) ) ;
661+ let mut updates_1_2 = get_htlc_update_msgs ( & nodes[ 1 ] , & nodes[ 2 ] . node . get_our_node_id ( ) ) ;
662662 let mut update_add = & mut updates_1_2. update_add_htlcs [ 0 ] ;
663663 nodes[ 2 ] . node . handle_update_add_htlc ( nodes[ 1 ] . node . get_our_node_id ( ) , & update_add) ;
664664 check_added_monitors ! ( nodes[ 2 ] , 0 ) ;
@@ -667,7 +667,7 @@ fn do_forward_fail_in_process_pending_htlc_fwds(check: ProcessPendingHTLCsCheck,
667667 cause_error ! ( nodes[ 1 ] , nodes[ 2 ] , nodes[ 3 ] , chan_id_2_3, chan_upd_2_3. short_channel_id) ;
668668 check_added_monitors ! ( nodes[ 2 ] , 1 ) ;
669669
670- let mut updates = get_htlc_update_msgs ! ( nodes[ 2 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
670+ let mut updates = get_htlc_update_msgs ( & nodes[ 2 ] , & nodes[ 1 ] . node . get_our_node_id ( ) ) ;
671671 let update_malformed = & mut updates. update_fail_malformed_htlcs [ 0 ] ;
672672 assert_eq ! ( update_malformed. failure_code, LocalHTLCFailureReason :: InvalidOnionBlinding . failure_code( ) ) ;
673673 assert_eq ! ( update_malformed. sha256_of_onion, [ 0 ; 32 ] ) ;
@@ -678,7 +678,7 @@ fn do_forward_fail_in_process_pending_htlc_fwds(check: ProcessPendingHTLCsCheck,
678678 nodes[ 1 ] . node . handle_update_fail_malformed_htlc ( nodes[ 2 ] . node . get_our_node_id ( ) , update_malformed) ;
679679 do_commitment_signed_dance ( & nodes[ 1 ] , & nodes[ 2 ] , & updates. commitment_signed , true , false ) ;
680680
681- let mut updates = get_htlc_update_msgs ! ( nodes[ 1 ] , nodes[ 0 ] . node. get_our_node_id( ) ) ;
681+ let mut updates = get_htlc_update_msgs ( & nodes[ 1 ] , & nodes[ 0 ] . node . get_our_node_id ( ) ) ;
682682 nodes[ 0 ] . node . handle_update_fail_htlc ( nodes[ 1 ] . node . get_our_node_id ( ) , & updates. update_fail_htlcs [ 0 ] ) ;
683683 do_commitment_signed_dance ( & nodes[ 0 ] , & nodes[ 1 ] , & updates. commitment_signed , false , false ) ;
684684 expect_payment_failed_conditions ( & nodes[ 0 ] , payment_hash, false ,
@@ -1051,7 +1051,7 @@ fn do_multi_hop_receiver_fail(check: ReceiveCheckFail) {
10511051 }
10521052 }
10531053
1054- let updates_2_1 = get_htlc_update_msgs ! ( nodes[ 2 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
1054+ let updates_2_1 = get_htlc_update_msgs ( & nodes[ 2 ] , & nodes[ 1 ] . node . get_our_node_id ( ) ) ;
10551055 assert_eq ! ( updates_2_1. update_fail_malformed_htlcs. len( ) , 1 ) ;
10561056 let update_malformed = & updates_2_1. update_fail_malformed_htlcs [ 0 ] ;
10571057 assert_eq ! ( update_malformed. sha256_of_onion, [ 0 ; 32 ] ) ;
@@ -1072,7 +1072,7 @@ fn do_multi_hop_receiver_fail(check: ReceiveCheckFail) {
10721072 _ => panic ! ( )
10731073 }
10741074 } ) . unwrap ( )
1075- } else { get_htlc_update_msgs ! ( nodes[ 1 ] , nodes[ 0 ] . node. get_our_node_id( ) ) } ;
1075+ } else { get_htlc_update_msgs ( & nodes[ 1 ] , & nodes[ 0 ] . node . get_our_node_id ( ) ) } ;
10761076 assert_eq ! ( updates_1_0. update_fail_htlcs. len( ) , 1 ) ;
10771077 nodes[ 0 ] . node . handle_update_fail_htlc ( nodes[ 1 ] . node . get_our_node_id ( ) , & updates_1_0. update_fail_htlcs [ 0 ] ) ;
10781078 do_commitment_signed_dance ( & nodes[ 0 ] , & nodes[ 1 ] , & updates_1_0. commitment_signed , false , false ) ;
@@ -1140,15 +1140,15 @@ fn blinded_path_retries() {
11401140 nodes[ 3 ] . node. process_pending_htlc_forwards( ) ;
11411141 check_added_monitors!( nodes[ 3 ] , 1 ) ;
11421142
1143- let updates = get_htlc_update_msgs! ( nodes[ 3 ] , $intro_node. node. get_our_node_id( ) ) ;
1143+ let updates = get_htlc_update_msgs( & nodes[ 3 ] , & $intro_node. node. get_our_node_id( ) ) ;
11441144 assert_eq!( updates. update_fail_malformed_htlcs. len( ) , 1 ) ;
11451145 let update_malformed = & updates. update_fail_malformed_htlcs[ 0 ] ;
11461146 assert_eq!( update_malformed. sha256_of_onion, [ 0 ; 32 ] ) ;
11471147 assert_eq!( update_malformed. failure_code, LocalHTLCFailureReason :: InvalidOnionBlinding . failure_code( ) ) ;
11481148 $intro_node. node. handle_update_fail_malformed_htlc( nodes[ 3 ] . node. get_our_node_id( ) , update_malformed) ;
11491149 do_commitment_signed_dance( & $intro_node, & nodes[ 3 ] , & updates. commitment_signed, true , false ) ;
11501150
1151- let updates = get_htlc_update_msgs! ( $intro_node, nodes[ 0 ] . node. get_our_node_id( ) ) ;
1151+ let updates = get_htlc_update_msgs( & $intro_node, & nodes[ 0 ] . node. get_our_node_id( ) ) ;
11521152 assert_eq!( updates. update_fail_htlcs. len( ) , 1 ) ;
11531153 nodes[ 0 ] . node. handle_update_fail_htlc( $intro_node. node. get_our_node_id( ) , & updates. update_fail_htlcs[ 0 ] ) ;
11541154 do_commitment_signed_dance( & nodes[ 0 ] , & $intro_node, & updates. commitment_signed, false , false ) ;
@@ -1256,7 +1256,7 @@ fn min_htlc() {
12561256 & [ HTLCHandlingFailureType :: Forward { node_id: Some ( nodes[ 2 ] . node. get_our_node_id( ) ) , channel_id: chan_1_2. 2 } ]
12571257 ) ;
12581258 check_added_monitors ( & nodes[ 1 ] , 1 ) ;
1259- let mut updates = get_htlc_update_msgs ! ( nodes[ 1 ] , nodes[ 0 ] . node. get_our_node_id( ) ) ;
1259+ let mut updates = get_htlc_update_msgs ( & nodes[ 1 ] , & nodes[ 0 ] . node . get_our_node_id ( ) ) ;
12601260 nodes[ 0 ] . node . handle_update_fail_htlc ( nodes[ 1 ] . node . get_our_node_id ( ) , & updates. update_fail_htlcs [ 0 ] ) ;
12611261 do_commitment_signed_dance ( & nodes[ 0 ] , & nodes[ 1 ] , & updates. commitment_signed , false , false ) ;
12621262 expect_payment_failed_conditions ( & nodes[ 0 ] , payment_hash, false ,
@@ -1448,7 +1448,7 @@ fn fails_receive_tlvs_authentication() {
14481448 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
14491449 expect_htlc_handling_failed_destinations ! ( nodes[ 1 ] . node. get_and_clear_pending_events( ) , & [ HTLCHandlingFailureType :: InvalidOnion ] ) ;
14501450
1451- let mut update_fail = get_htlc_update_msgs ! ( nodes[ 1 ] , nodes[ 0 ] . node. get_our_node_id( ) ) ;
1451+ let mut update_fail = get_htlc_update_msgs ( & nodes[ 1 ] , & nodes[ 0 ] . node . get_our_node_id ( ) ) ;
14521452 assert ! ( update_fail. update_fail_htlcs. len( ) == 1 ) ;
14531453 let fail_msg = & update_fail. update_fail_htlcs [ 0 ] ;
14541454 nodes[ 0 ] . node . handle_update_fail_htlc ( nodes[ 1 ] . node . get_our_node_id ( ) , fail_msg) ;
@@ -2151,14 +2151,14 @@ fn test_trampoline_forward_payload_encoded_as_receive() {
21512151 do_pass_along_path ( args) ;
21522152
21532153 {
2154- let unblinded_node_updates = get_htlc_update_msgs ! ( nodes[ 2 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
2154+ let unblinded_node_updates = get_htlc_update_msgs ( & nodes[ 2 ] , & nodes[ 1 ] . node . get_our_node_id ( ) ) ;
21552155 nodes[ 1 ] . node . handle_update_fail_htlc (
21562156 nodes[ 2 ] . node . get_our_node_id ( ) , & unblinded_node_updates. update_fail_htlcs [ 0 ]
21572157 ) ;
21582158 do_commitment_signed_dance ( & nodes[ 1 ] , & nodes[ 2 ] , & unblinded_node_updates. commitment_signed , true , false ) ;
21592159 }
21602160 {
2161- let unblinded_node_updates = get_htlc_update_msgs ! ( nodes[ 1 ] , nodes[ 0 ] . node. get_our_node_id( ) ) ;
2161+ let unblinded_node_updates = get_htlc_update_msgs ( & nodes[ 1 ] , & nodes[ 0 ] . node . get_our_node_id ( ) ) ;
21622162 nodes[ 0 ] . node . handle_update_fail_htlc (
21632163 nodes[ 1 ] . node . get_our_node_id ( ) , & unblinded_node_updates. update_fail_htlcs [ 0 ]
21642164 ) ;
@@ -2526,14 +2526,14 @@ fn test_trampoline_forward_rejection() {
25262526 do_pass_along_path ( args) ;
25272527
25282528 {
2529- let unblinded_node_updates = get_htlc_update_msgs ! ( nodes[ 2 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
2529+ let unblinded_node_updates = get_htlc_update_msgs ( & nodes[ 2 ] , & nodes[ 1 ] . node . get_our_node_id ( ) ) ;
25302530 nodes[ 1 ] . node . handle_update_fail_htlc (
25312531 nodes[ 2 ] . node . get_our_node_id ( ) , & unblinded_node_updates. update_fail_htlcs [ 0 ]
25322532 ) ;
25332533 do_commitment_signed_dance ( & nodes[ 1 ] , & nodes[ 2 ] , & unblinded_node_updates. commitment_signed , true , false ) ;
25342534 }
25352535 {
2536- let unblinded_node_updates = get_htlc_update_msgs ! ( nodes[ 1 ] , nodes[ 0 ] . node. get_our_node_id( ) ) ;
2536+ let unblinded_node_updates = get_htlc_update_msgs ( & nodes[ 1 ] , & nodes[ 0 ] . node . get_our_node_id ( ) ) ;
25372537 nodes[ 0 ] . node . handle_update_fail_htlc (
25382538 nodes[ 1 ] . node . get_our_node_id ( ) , & unblinded_node_updates. update_fail_htlcs [ 0 ]
25392539 ) ;
0 commit comments