@@ -2438,7 +2438,7 @@ fn test_phantom_onion_hmac_failure() {
2438
2438
2439
2439
nodes[ 1 ] . node . handle_update_add_htlc ( nodes[ 0 ] . node . get_our_node_id ( ) , & update_add) ;
2440
2440
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 ( ) , & [ ] ) ;
2442
2442
nodes[ 1 ] . node . process_pending_update_add_htlcs ( ) ;
2443
2443
2444
2444
// Modify the payload so the phantom hop's HMAC is bogus.
@@ -2461,7 +2461,7 @@ fn test_phantom_onion_hmac_failure() {
2461
2461
}
2462
2462
} ;
2463
2463
nodes[ 1 ] . node . process_pending_htlc_forwards ( ) ;
2464
- expect_pending_htlcs_forwardable_conditions (
2464
+ expect_htlc_failure_conditions (
2465
2465
nodes[ 1 ] . node . get_and_clear_pending_events ( ) ,
2466
2466
& [ HTLCHandlingFailureType :: Receive { payment_hash } ] ,
2467
2467
) ;
@@ -2511,7 +2511,7 @@ fn test_phantom_invalid_onion_payload() {
2511
2511
2512
2512
nodes[ 1 ] . node . handle_update_add_htlc ( nodes[ 0 ] . node . get_our_node_id ( ) , & update_add) ;
2513
2513
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 ( ) , & [ ] ) ;
2515
2515
nodes[ 1 ] . node . process_pending_update_add_htlcs ( ) ;
2516
2516
2517
2517
// Modify the onion packet to have an invalid payment amount.
@@ -2562,7 +2562,7 @@ fn test_phantom_invalid_onion_payload() {
2562
2562
}
2563
2563
}
2564
2564
nodes[ 1 ] . node . process_pending_htlc_forwards ( ) ;
2565
- expect_pending_htlcs_forwardable_conditions (
2565
+ expect_htlc_failure_conditions (
2566
2566
nodes[ 1 ] . node . get_and_clear_pending_events ( ) ,
2567
2567
& [ HTLCHandlingFailureType :: Receive { payment_hash } ] ,
2568
2568
) ;
@@ -2610,7 +2610,7 @@ fn test_phantom_final_incorrect_cltv_expiry() {
2610
2610
2611
2611
nodes[ 1 ] . node . handle_update_add_htlc ( nodes[ 0 ] . node . get_our_node_id ( ) , & update_add) ;
2612
2612
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 ( ) , & [ ] ) ;
2614
2614
nodes[ 1 ] . node . process_pending_update_add_htlcs ( ) ;
2615
2615
2616
2616
// Modify the payload so the phantom hop's HMAC is bogus.
@@ -2628,7 +2628,7 @@ fn test_phantom_final_incorrect_cltv_expiry() {
2628
2628
}
2629
2629
}
2630
2630
nodes[ 1 ] . node . process_pending_htlc_forwards ( ) ;
2631
- expect_pending_htlcs_forwardable_conditions (
2631
+ expect_htlc_failure_conditions (
2632
2632
nodes[ 1 ] . node . get_and_clear_pending_events ( ) ,
2633
2633
& [ HTLCHandlingFailureType :: Receive { payment_hash } ] ,
2634
2634
) ;
@@ -2680,9 +2680,9 @@ fn test_phantom_failure_too_low_cltv() {
2680
2680
nodes[ 1 ] . node . handle_update_add_htlc ( nodes[ 0 ] . node . get_our_node_id ( ) , & update_add) ;
2681
2681
commitment_signed_dance ! ( nodes[ 1 ] , nodes[ 0 ] , & update_0. commitment_signed, false , true ) ;
2682
2682
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 ( ) , & [ ] ) ;
2684
2684
nodes[ 1 ] . node . process_pending_htlc_forwards ( ) ;
2685
- expect_pending_htlcs_forwardable_conditions (
2685
+ expect_htlc_failure_conditions (
2686
2686
nodes[ 1 ] . node . get_and_clear_pending_events ( ) ,
2687
2687
& [ HTLCHandlingFailureType :: Receive { payment_hash } ] ,
2688
2688
) ;
@@ -2838,11 +2838,11 @@ fn test_phantom_failure_too_low_recv_amt() {
2838
2838
nodes[ 1 ] . node . handle_update_add_htlc ( nodes[ 0 ] . node . get_our_node_id ( ) , & update_add) ;
2839
2839
commitment_signed_dance ! ( nodes[ 1 ] , nodes[ 0 ] , & update_0. commitment_signed, false , true ) ;
2840
2840
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 ( ) , & [ ] ) ;
2842
2842
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 ( ) , & [ ] ) ;
2844
2844
nodes[ 1 ] . node . process_pending_htlc_forwards ( ) ;
2845
- expect_pending_htlcs_forwardable_conditions (
2845
+ expect_htlc_failure_conditions (
2846
2846
nodes[ 1 ] . node . get_and_clear_pending_events ( ) ,
2847
2847
& [ HTLCHandlingFailureType :: Receive { payment_hash : payment_hash. clone ( ) } ] ,
2848
2848
) ;
@@ -2958,9 +2958,9 @@ fn test_phantom_failure_reject_payment() {
2958
2958
nodes[ 1 ] . node . handle_update_add_htlc ( nodes[ 0 ] . node . get_our_node_id ( ) , & update_add) ;
2959
2959
commitment_signed_dance ! ( nodes[ 1 ] , nodes[ 0 ] , & update_0. commitment_signed, false , true ) ;
2960
2960
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 ( ) , & [ ] ) ;
2962
2962
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 ( ) , & [ ] ) ;
2964
2964
nodes[ 1 ] . node . process_pending_htlc_forwards ( ) ;
2965
2965
expect_payment_claimable ! (
2966
2966
nodes[ 1 ] ,
@@ -2971,7 +2971,7 @@ fn test_phantom_failure_reject_payment() {
2971
2971
route. paths[ 0 ] . hops. last( ) . unwrap( ) . pubkey
2972
2972
) ;
2973
2973
nodes[ 1 ] . node . fail_htlc_backwards ( & payment_hash) ;
2974
- expect_pending_htlcs_forwardable_conditions (
2974
+ expect_htlc_failure_conditions (
2975
2975
nodes[ 1 ] . node . get_and_clear_pending_events ( ) ,
2976
2976
& [ HTLCHandlingFailureType :: Receive { payment_hash } ] ,
2977
2977
) ;
0 commit comments