@@ -439,7 +439,7 @@ fn do_forward_checks_failure(check: ForwardCheckFail, intro_fails: bool) {
439439 check_added_monitors ! ( nodes[ 1 ] , 0 ) ;
440440 do_commitment_signed_dance ( & nodes[ 1 ] , & nodes[ 0 ] , & updates_0_1. commitment_signed , true , true ) ;
441441
442- expect_pending_htlc_processing ( & nodes[ 1 ] , false ) ;
442+ expect_and_process_pending_htlcs ( & nodes[ 1 ] , false ) ;
443443 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
444444
445445 if intro_fails {
@@ -477,7 +477,7 @@ fn do_forward_checks_failure(check: ForwardCheckFail, intro_fails: bool) {
477477 check_added_monitors ! ( nodes[ 2 ] , 0 ) ;
478478 do_commitment_signed_dance ( & nodes[ 2 ] , & nodes[ 1 ] , & updates_1_2. commitment_signed , true , true ) ;
479479
480- expect_pending_htlc_processing ( & nodes[ 2 ] , false ) ;
480+ expect_and_process_pending_htlcs ( & nodes[ 2 ] , false ) ;
481481 let failed_destination = match check {
482482 ForwardCheckFail :: InboundOnionCheck |ForwardCheckFail :: ForwardPayloadEncodedAsReceive => HTLCHandlingFailureType :: InvalidOnion ,
483483 ForwardCheckFail :: OutboundChannelCheck =>
@@ -534,7 +534,7 @@ fn failed_backwards_to_intro_node() {
534534 nodes[ 1 ] . node . handle_update_add_htlc ( nodes[ 0 ] . node . get_our_node_id ( ) , & payment_event. msgs [ 0 ] ) ;
535535 check_added_monitors ! ( nodes[ 1 ] , 0 ) ;
536536 do_commitment_signed_dance ( & nodes[ 1 ] , & nodes[ 0 ] , & payment_event. commitment_msg , false , false ) ;
537- expect_pending_htlc_processing ( & nodes[ 1 ] , false ) ;
537+ expect_and_process_pending_htlcs ( & nodes[ 1 ] , false ) ;
538538 check_added_monitors ! ( & nodes[ 1 ] , 1 ) ;
539539
540540 let mut events = nodes[ 1 ] . node . get_and_clear_pending_msg_events ( ) ;
@@ -548,7 +548,7 @@ fn failed_backwards_to_intro_node() {
548548 check_added_monitors ! ( nodes[ 2 ] , 0 ) ;
549549 do_commitment_signed_dance ( & nodes[ 2 ] , & nodes[ 1 ] , & payment_event. commitment_msg , true , true ) ;
550550
551- expect_pending_htlc_processing ( & nodes[ 2 ] , false ) ;
551+ expect_and_process_pending_htlcs ( & nodes[ 2 ] , false ) ;
552552 expect_htlc_handling_failed_destinations ! ( nodes[ 2 ] . node. get_and_clear_pending_events( ) , & [ HTLCHandlingFailureType :: InvalidOnion ] ) ;
553553 check_added_monitors ( & nodes[ 2 ] , 1 ) ;
554554
@@ -626,7 +626,7 @@ fn do_forward_fail_in_process_pending_htlc_fwds(check: ProcessPendingHTLCsCheck,
626626 // Disconnect the next-hop peer so when we go to forward in process_pending_htlc_forwards, the
627627 // intro node will error backwards.
628628 $curr_node. node. peer_disconnected( $next_node. node. get_our_node_id( ) ) ;
629- expect_pending_htlc_processing ( & $curr_node, false ) ;
629+ expect_and_process_pending_htlcs ( & $curr_node, false ) ;
630630 expect_htlc_handling_failed_destinations!( $curr_node. node. get_and_clear_pending_events( ) ,
631631 vec![ HTLCHandlingFailureType :: Forward { node_id: Some ( $next_node. node. get_our_node_id( ) ) , channel_id: $failed_chan_id } ] ) ;
632632 } ,
@@ -657,7 +657,7 @@ fn do_forward_fail_in_process_pending_htlc_fwds(check: ProcessPendingHTLCsCheck,
657657 return
658658 }
659659
660- expect_pending_htlc_processing ( & nodes[ 1 ] , false ) ;
660+ expect_and_process_pending_htlcs ( & nodes[ 1 ] , false ) ;
661661 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
662662
663663 let mut updates_1_2 = get_htlc_update_msgs ! ( nodes[ 1 ] , nodes[ 2 ] . node. get_our_node_id( ) ) ;
@@ -724,7 +724,7 @@ fn do_blinded_intercept_payment(intercept_node_fails: bool) {
724724 } ;
725725 nodes[ 1 ] . node . handle_update_add_htlc ( nodes[ 0 ] . node . get_our_node_id ( ) , & payment_event. msgs [ 0 ] ) ;
726726 commitment_signed_dance ! ( nodes[ 1 ] , nodes[ 0 ] , & payment_event. commitment_msg, false , true ) ;
727- expect_pending_htlc_processing ( & nodes[ 1 ] , false ) ;
727+ expect_and_process_pending_htlcs ( & nodes[ 1 ] , false ) ;
728728
729729 let events = nodes[ 1 ] . node . get_and_clear_pending_events ( ) ;
730730 assert_eq ! ( events. len( ) , 1 ) ;
@@ -750,7 +750,7 @@ fn do_blinded_intercept_payment(intercept_node_fails: bool) {
750750 }
751751
752752 nodes[ 1 ] . node . forward_intercepted_htlc ( intercept_id, & channel_id, nodes[ 2 ] . node . get_our_node_id ( ) , expected_outbound_amount_msat) . unwrap ( ) ;
753- expect_pending_htlc_processing ( & nodes[ 1 ] , false ) ;
753+ expect_and_process_pending_htlcs ( & nodes[ 1 ] , false ) ;
754754
755755 let payment_event = {
756756 {
@@ -764,7 +764,7 @@ fn do_blinded_intercept_payment(intercept_node_fails: bool) {
764764 } ;
765765 nodes[ 2 ] . node . handle_update_add_htlc ( nodes[ 1 ] . node . get_our_node_id ( ) , & payment_event. msgs [ 0 ] ) ;
766766 commitment_signed_dance ! ( nodes[ 2 ] , nodes[ 1 ] , & payment_event. commitment_msg, false , true ) ;
767- expect_pending_htlc_processing ( & nodes[ 2 ] , false ) ;
767+ expect_and_process_pending_htlcs ( & nodes[ 2 ] , false ) ;
768768
769769 expect_payment_claimable ! ( & nodes[ 2 ] , payment_hash, payment_secret, amt_msat, None , nodes[ 2 ] . node. get_our_node_id( ) ) ;
770770 do_claim_payment_along_route (
@@ -953,7 +953,7 @@ fn do_multi_hop_receiver_fail(check: ReceiveCheckFail) {
953953 nodes[ 1 ] . node . handle_update_add_htlc ( nodes[ 0 ] . node . get_our_node_id ( ) , & payment_event_0_1. msgs [ 0 ] ) ;
954954 check_added_monitors ! ( nodes[ 1 ] , 0 ) ;
955955 do_commitment_signed_dance ( & nodes[ 1 ] , & nodes[ 0 ] , & payment_event_0_1. commitment_msg , false , false ) ;
956- expect_pending_htlc_processing ( & nodes[ 1 ] , false ) ;
956+ expect_and_process_pending_htlcs ( & nodes[ 1 ] , false ) ;
957957 check_added_monitors ! ( & nodes[ 1 ] , 1 ) ;
958958
959959 let mut payment_event_1_2 = {
@@ -968,7 +968,7 @@ fn do_multi_hop_receiver_fail(check: ReceiveCheckFail) {
968968 nodes[ 2 ] . node . handle_update_add_htlc ( nodes[ 1 ] . node . get_our_node_id ( ) , & payment_event_1_2. msgs [ 0 ] ) ;
969969 check_added_monitors ! ( nodes[ 2 ] , 0 ) ;
970970 do_commitment_signed_dance ( & nodes[ 2 ] , & nodes[ 1 ] , & payment_event_1_2. commitment_msg , true , true ) ;
971- expect_pending_htlc_processing ( & nodes[ 2 ] , false ) ;
971+ expect_and_process_pending_htlcs ( & nodes[ 2 ] , false ) ;
972972 check_payment_claimable (
973973 & nodes[ 2 ] . node . get_and_clear_pending_events ( ) [ 0 ] , payment_hash, payment_secret, amt_msat,
974974 None , nodes[ 2 ] . node . get_our_node_id ( )
@@ -1004,7 +1004,7 @@ fn do_multi_hop_receiver_fail(check: ReceiveCheckFail) {
10041004 nodes[ 2 ] . node . handle_update_add_htlc ( nodes[ 1 ] . node . get_our_node_id ( ) , update_add) ;
10051005 check_added_monitors ! ( nodes[ 2 ] , 0 ) ;
10061006 do_commitment_signed_dance ( & nodes[ 2 ] , & nodes[ 1 ] , & payment_event_1_2. commitment_msg , true , true ) ;
1007- expect_pending_htlc_processing ( & nodes[ 2 ] , false ) ;
1007+ expect_and_process_pending_htlcs ( & nodes[ 2 ] , false ) ;
10081008 expect_htlc_handling_failed_destinations ! ( nodes[ 2 ] . node. get_and_clear_pending_events( ) , & [ HTLCHandlingFailureType :: InvalidOnion ] ) ;
10091009 check_added_monitors ( & nodes[ 2 ] , 1 ) ;
10101010 } ,
@@ -1014,7 +1014,7 @@ fn do_multi_hop_receiver_fail(check: ReceiveCheckFail) {
10141014 nodes[ 2 ] . node . handle_update_add_htlc ( nodes[ 1 ] . node . get_our_node_id ( ) , update_add) ;
10151015 check_added_monitors ! ( nodes[ 2 ] , 0 ) ;
10161016 do_commitment_signed_dance ( & nodes[ 2 ] , & nodes[ 1 ] , & payment_event_1_2. commitment_msg , true , true ) ;
1017- expect_pending_htlc_processing ( & nodes[ 2 ] , false ) ;
1017+ expect_and_process_pending_htlcs ( & nodes[ 2 ] , false ) ;
10181018 expect_htlc_handling_failed_destinations ! ( nodes[ 2 ] . node. get_and_clear_pending_events( ) , & [ HTLCHandlingFailureType :: Receive { payment_hash } ] ) ;
10191019 check_added_monitors ( & nodes[ 2 ] , 1 ) ;
10201020 } ,
@@ -1030,7 +1030,7 @@ fn do_multi_hop_receiver_fail(check: ReceiveCheckFail) {
10301030
10311031 nodes[ 2 ] . node . handle_shutdown ( nodes[ 1 ] . node . get_our_node_id ( ) , & node_1_shutdown) ;
10321032 commitment_signed_dance ! ( nodes[ 2 ] , nodes[ 1 ] , ( ) , false , true , false , false ) ;
1033- expect_pending_htlc_processing ( & nodes[ 2 ] , false ) ;
1033+ expect_and_process_pending_htlcs ( & nodes[ 2 ] , false ) ;
10341034 expect_htlc_handling_failed_destinations ! ( nodes[ 2 ] . node. get_and_clear_pending_events( ) , & [ HTLCHandlingFailureType :: Receive { payment_hash } ] ) ;
10351035 check_added_monitors ( & nodes[ 2 ] , 1 ) ;
10361036 } ,
@@ -1039,15 +1039,15 @@ fn do_multi_hop_receiver_fail(check: ReceiveCheckFail) {
10391039 nodes[ 2 ] . node . handle_update_add_htlc ( nodes[ 1 ] . node . get_our_node_id ( ) , & payment_event_1_2. msgs [ 0 ] ) ;
10401040 check_added_monitors ! ( nodes[ 2 ] , 0 ) ;
10411041 do_commitment_signed_dance ( & nodes[ 2 ] , & nodes[ 1 ] , & payment_event_1_2. commitment_msg , true , true ) ;
1042- expect_pending_htlc_processing ( & nodes[ 2 ] , true ) ;
1042+ expect_and_process_pending_htlcs ( & nodes[ 2 ] , true ) ;
10431043 expect_pending_htlcs_forwardable_conditions ( nodes[ 2 ] . node . get_and_clear_pending_events ( ) , & [ HTLCHandlingFailureType :: Receive { payment_hash } ] ) ;
10441044 check_added_monitors ! ( nodes[ 2 ] , 1 ) ;
10451045 } ,
10461046 ReceiveCheckFail :: PaymentConstraints => {
10471047 nodes[ 2 ] . node . handle_update_add_htlc ( nodes[ 1 ] . node . get_our_node_id ( ) , & payment_event_1_2. msgs [ 0 ] ) ;
10481048 check_added_monitors ! ( nodes[ 2 ] , 0 ) ;
10491049 do_commitment_signed_dance ( & nodes[ 2 ] , & nodes[ 1 ] , & payment_event_1_2. commitment_msg , true , true ) ;
1050- expect_pending_htlc_processing ( & nodes[ 2 ] , false ) ;
1050+ expect_and_process_pending_htlcs ( & nodes[ 2 ] , false ) ;
10511051 expect_htlc_handling_failed_destinations ! ( nodes[ 2 ] . node. get_and_clear_pending_events( ) , & [ HTLCHandlingFailureType :: Receive { payment_hash } ] ) ;
10521052 check_added_monitors ( & nodes[ 2 ] , 1 ) ;
10531053 }
@@ -1252,7 +1252,7 @@ fn min_htlc() {
12521252 nodes[ 1 ] . node . handle_update_add_htlc ( nodes[ 0 ] . node . get_our_node_id ( ) , & payment_event_0_1. msgs [ 0 ] ) ;
12531253 check_added_monitors ! ( nodes[ 1 ] , 0 ) ;
12541254 do_commitment_signed_dance ( & nodes[ 1 ] , & nodes[ 0 ] , & payment_event_0_1. commitment_msg , true , true ) ;
1255- expect_pending_htlc_processing ( & nodes[ 1 ] , false ) ;
1255+ expect_and_process_pending_htlcs ( & nodes[ 1 ] , false ) ;
12561256 expect_htlc_handling_failed_destinations ! (
12571257 nodes[ 1 ] . node. get_and_clear_pending_events( ) ,
12581258 & [ HTLCHandlingFailureType :: Forward { node_id: Some ( nodes[ 2 ] . node. get_our_node_id( ) ) , channel_id: chan_1_2. 2 } ]
@@ -1445,7 +1445,7 @@ fn fails_receive_tlvs_authentication() {
14451445
14461446 nodes[ 1 ] . node . handle_update_add_htlc ( nodes[ 0 ] . node . get_our_node_id ( ) , & payment_event. msgs [ 0 ] ) ;
14471447 do_commitment_signed_dance ( & nodes[ 1 ] , & nodes[ 0 ] , & payment_event. commitment_msg , true , true ) ;
1448- expect_pending_htlc_processing ( & nodes[ 1 ] , false ) ;
1448+ expect_and_process_pending_htlcs ( & nodes[ 1 ] , false ) ;
14491449 nodes[ 1 ] . node . process_pending_htlc_forwards ( ) ;
14501450 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
14511451 expect_htlc_handling_failed_destinations ! ( nodes[ 1 ] . node. get_and_clear_pending_events( ) , & [ HTLCHandlingFailureType :: InvalidOnion ] ) ;
0 commit comments