@@ -2438,7 +2438,7 @@ fn test_phantom_onion_hmac_failure() {
24382438
24392439 nodes[ 1 ] . node . handle_update_add_htlc ( nodes[ 0 ] . node . get_our_node_id ( ) , & update_add) ;
24402440 commitment_signed_dance ! ( nodes[ 1 ] , nodes[ 0 ] , & update_0. commitment_signed, false , true ) ;
2441- expect_pending_htlcs_forwardable_conditions ( nodes[ 1 ] . node . get_and_clear_pending_events ( ) , & [ ] ) ;
2441+ expect_htlc_failure_conditions ( nodes[ 1 ] . node . get_and_clear_pending_events ( ) , & [ ] ) ;
24422442 nodes[ 1 ] . node . process_pending_update_add_htlcs ( ) ;
24432443
24442444 // Modify the payload so the phantom hop's HMAC is bogus.
@@ -2461,7 +2461,7 @@ fn test_phantom_onion_hmac_failure() {
24612461 }
24622462 } ;
24632463 nodes[ 1 ] . node . process_pending_htlc_forwards ( ) ;
2464- expect_pending_htlcs_forwardable_conditions (
2464+ expect_htlc_failure_conditions (
24652465 nodes[ 1 ] . node . get_and_clear_pending_events ( ) ,
24662466 & [ HTLCHandlingFailureType :: Receive { payment_hash } ] ,
24672467 ) ;
@@ -2511,7 +2511,7 @@ fn test_phantom_invalid_onion_payload() {
25112511
25122512 nodes[ 1 ] . node . handle_update_add_htlc ( nodes[ 0 ] . node . get_our_node_id ( ) , & update_add) ;
25132513 commitment_signed_dance ! ( nodes[ 1 ] , nodes[ 0 ] , & update_0. commitment_signed, false , true ) ;
2514- expect_pending_htlcs_forwardable_conditions ( nodes[ 1 ] . node . get_and_clear_pending_events ( ) , & [ ] ) ;
2514+ expect_htlc_failure_conditions ( nodes[ 1 ] . node . get_and_clear_pending_events ( ) , & [ ] ) ;
25152515 nodes[ 1 ] . node . process_pending_update_add_htlcs ( ) ;
25162516
25172517 // Modify the onion packet to have an invalid payment amount.
@@ -2562,7 +2562,7 @@ fn test_phantom_invalid_onion_payload() {
25622562 }
25632563 }
25642564 nodes[ 1 ] . node . process_pending_htlc_forwards ( ) ;
2565- expect_pending_htlcs_forwardable_conditions (
2565+ expect_htlc_failure_conditions (
25662566 nodes[ 1 ] . node . get_and_clear_pending_events ( ) ,
25672567 & [ HTLCHandlingFailureType :: Receive { payment_hash } ] ,
25682568 ) ;
@@ -2610,7 +2610,7 @@ fn test_phantom_final_incorrect_cltv_expiry() {
26102610
26112611 nodes[ 1 ] . node . handle_update_add_htlc ( nodes[ 0 ] . node . get_our_node_id ( ) , & update_add) ;
26122612 commitment_signed_dance ! ( nodes[ 1 ] , nodes[ 0 ] , & update_0. commitment_signed, false , true ) ;
2613- expect_pending_htlcs_forwardable_conditions ( nodes[ 1 ] . node . get_and_clear_pending_events ( ) , & [ ] ) ;
2613+ expect_htlc_failure_conditions ( nodes[ 1 ] . node . get_and_clear_pending_events ( ) , & [ ] ) ;
26142614 nodes[ 1 ] . node . process_pending_update_add_htlcs ( ) ;
26152615
26162616 // Modify the payload so the phantom hop's HMAC is bogus.
@@ -2628,7 +2628,7 @@ fn test_phantom_final_incorrect_cltv_expiry() {
26282628 }
26292629 }
26302630 nodes[ 1 ] . node . process_pending_htlc_forwards ( ) ;
2631- expect_pending_htlcs_forwardable_conditions (
2631+ expect_htlc_failure_conditions (
26322632 nodes[ 1 ] . node . get_and_clear_pending_events ( ) ,
26332633 & [ HTLCHandlingFailureType :: Receive { payment_hash } ] ,
26342634 ) ;
@@ -2680,9 +2680,9 @@ fn test_phantom_failure_too_low_cltv() {
26802680 nodes[ 1 ] . node . handle_update_add_htlc ( nodes[ 0 ] . node . get_our_node_id ( ) , & update_add) ;
26812681 commitment_signed_dance ! ( nodes[ 1 ] , nodes[ 0 ] , & update_0. commitment_signed, false , true ) ;
26822682
2683- expect_pending_htlcs_forwardable_conditions ( nodes[ 1 ] . node . get_and_clear_pending_events ( ) , & [ ] ) ;
2683+ expect_htlc_failure_conditions ( nodes[ 1 ] . node . get_and_clear_pending_events ( ) , & [ ] ) ;
26842684 nodes[ 1 ] . node . process_pending_htlc_forwards ( ) ;
2685- expect_pending_htlcs_forwardable_conditions (
2685+ expect_htlc_failure_conditions (
26862686 nodes[ 1 ] . node . get_and_clear_pending_events ( ) ,
26872687 & [ HTLCHandlingFailureType :: Receive { payment_hash } ] ,
26882688 ) ;
@@ -2838,11 +2838,11 @@ fn test_phantom_failure_too_low_recv_amt() {
28382838 nodes[ 1 ] . node . handle_update_add_htlc ( nodes[ 0 ] . node . get_our_node_id ( ) , & update_add) ;
28392839 commitment_signed_dance ! ( nodes[ 1 ] , nodes[ 0 ] , & update_0. commitment_signed, false , true ) ;
28402840
2841- expect_pending_htlcs_forwardable_conditions ( nodes[ 1 ] . node . get_and_clear_pending_events ( ) , & [ ] ) ;
2841+ expect_htlc_failure_conditions ( nodes[ 1 ] . node . get_and_clear_pending_events ( ) , & [ ] ) ;
28422842 nodes[ 1 ] . node . process_pending_htlc_forwards ( ) ;
2843- expect_pending_htlcs_forwardable_conditions ( nodes[ 1 ] . node . get_and_clear_pending_events ( ) , & [ ] ) ;
2843+ expect_htlc_failure_conditions ( nodes[ 1 ] . node . get_and_clear_pending_events ( ) , & [ ] ) ;
28442844 nodes[ 1 ] . node . process_pending_htlc_forwards ( ) ;
2845- expect_pending_htlcs_forwardable_conditions (
2845+ expect_htlc_failure_conditions (
28462846 nodes[ 1 ] . node . get_and_clear_pending_events ( ) ,
28472847 & [ HTLCHandlingFailureType :: Receive { payment_hash : payment_hash. clone ( ) } ] ,
28482848 ) ;
@@ -2958,9 +2958,9 @@ fn test_phantom_failure_reject_payment() {
29582958 nodes[ 1 ] . node . handle_update_add_htlc ( nodes[ 0 ] . node . get_our_node_id ( ) , & update_add) ;
29592959 commitment_signed_dance ! ( nodes[ 1 ] , nodes[ 0 ] , & update_0. commitment_signed, false , true ) ;
29602960
2961- expect_pending_htlcs_forwardable_conditions ( nodes[ 1 ] . node . get_and_clear_pending_events ( ) , & [ ] ) ;
2961+ expect_htlc_failure_conditions ( nodes[ 1 ] . node . get_and_clear_pending_events ( ) , & [ ] ) ;
29622962 nodes[ 1 ] . node . process_pending_htlc_forwards ( ) ;
2963- expect_pending_htlcs_forwardable_conditions ( nodes[ 1 ] . node . get_and_clear_pending_events ( ) , & [ ] ) ;
2963+ expect_htlc_failure_conditions ( nodes[ 1 ] . node . get_and_clear_pending_events ( ) , & [ ] ) ;
29642964 nodes[ 1 ] . node . process_pending_htlc_forwards ( ) ;
29652965 expect_payment_claimable ! (
29662966 nodes[ 1 ] ,
@@ -2971,7 +2971,7 @@ fn test_phantom_failure_reject_payment() {
29712971 route. paths[ 0 ] . hops. last( ) . unwrap( ) . pubkey
29722972 ) ;
29732973 nodes[ 1 ] . node . fail_htlc_backwards ( & payment_hash) ;
2974- expect_pending_htlcs_forwardable_conditions (
2974+ expect_htlc_failure_conditions (
29752975 nodes[ 1 ] . node . get_and_clear_pending_events ( ) ,
29762976 & [ HTLCHandlingFailureType :: Receive { payment_hash } ] ,
29772977 ) ;
0 commit comments