@@ -2460,12 +2460,12 @@ where
2460
2460
}
2461
2461
2462
2462
#[ cfg( test) ]
2463
- pub ( crate ) fn test_send_payment_along_path ( & self , path : & Vec < RouteHop > , payment_params : & Option < PaymentParameters > , payment_hash : & PaymentHash , payment_secret : & Option < PaymentSecret > , total_value : u64 , cur_height : u32 , payment_id : PaymentId , keysend_preimage : & Option < PaymentPreimage > , session_priv_bytes : [ u8 ; 32 ] ) -> Result < ( ) , APIError > {
2463
+ pub ( crate ) fn test_send_payment_along_path ( & self , path : & Vec < RouteHop > , payment_hash : & PaymentHash , payment_secret : & Option < PaymentSecret > , total_value : u64 , cur_height : u32 , payment_id : PaymentId , keysend_preimage : & Option < PaymentPreimage > , session_priv_bytes : [ u8 ; 32 ] ) -> Result < ( ) , APIError > {
2464
2464
let _lck = self . total_consistency_lock . read ( ) . unwrap ( ) ;
2465
- self . send_payment_along_path ( path, payment_params , payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv_bytes)
2465
+ self . send_payment_along_path ( path, payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv_bytes)
2466
2466
}
2467
2467
2468
- fn send_payment_along_path ( & self , path : & Vec < RouteHop > , payment_params : & Option < PaymentParameters > , payment_hash : & PaymentHash , payment_secret : & Option < PaymentSecret > , total_value : u64 , cur_height : u32 , payment_id : PaymentId , keysend_preimage : & Option < PaymentPreimage > , session_priv_bytes : [ u8 ; 32 ] ) -> Result < ( ) , APIError > {
2468
+ fn send_payment_along_path ( & self , path : & Vec < RouteHop > , payment_hash : & PaymentHash , payment_secret : & Option < PaymentSecret > , total_value : u64 , cur_height : u32 , payment_id : PaymentId , keysend_preimage : & Option < PaymentPreimage > , session_priv_bytes : [ u8 ; 32 ] ) -> Result < ( ) , APIError > {
2469
2469
// The top-level caller should hold the total_consistency_lock read lock.
2470
2470
debug_assert ! ( self . total_consistency_lock. try_write( ) . is_err( ) ) ;
2471
2471
@@ -2609,8 +2609,8 @@ where
2609
2609
let _persistence_guard = PersistenceNotifierGuard :: notify_on_drop ( & self . total_consistency_lock , & self . persistence_notifier ) ;
2610
2610
self . pending_outbound_payments
2611
2611
. send_payment_with_route ( route, payment_hash, payment_secret, payment_id, & self . entropy_source , & self . node_signer , best_block_height,
2612
- |path, payment_params , payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv|
2613
- self . send_payment_along_path ( path, payment_params , payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv) )
2612
+ |path, payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv|
2613
+ self . send_payment_along_path ( path, payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv) )
2614
2614
}
2615
2615
2616
2616
/// Similar to [`ChannelManager::send_payment`], but will automatically find a route based on
@@ -2623,17 +2623,17 @@ where
2623
2623
& self . router , self . list_usable_channels ( ) , || self . compute_inflight_htlcs ( ) ,
2624
2624
& self . entropy_source , & self . node_signer , best_block_height, & self . logger ,
2625
2625
& self . pending_events ,
2626
- |path, payment_params , payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv|
2627
- self . send_payment_along_path ( path, payment_params , payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv) )
2626
+ |path, payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv|
2627
+ self . send_payment_along_path ( path, payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv) )
2628
2628
}
2629
2629
2630
2630
#[ cfg( test) ]
2631
2631
fn test_send_payment_internal ( & self , route : & Route , payment_hash : PaymentHash , payment_secret : & Option < PaymentSecret > , keysend_preimage : Option < PaymentPreimage > , payment_id : PaymentId , recv_value_msat : Option < u64 > , onion_session_privs : Vec < [ u8 ; 32 ] > ) -> Result < ( ) , PaymentSendFailure > {
2632
2632
let best_block_height = self . best_block . read ( ) . unwrap ( ) . height ( ) ;
2633
2633
let _persistence_guard = PersistenceNotifierGuard :: notify_on_drop ( & self . total_consistency_lock , & self . persistence_notifier ) ;
2634
2634
self . pending_outbound_payments . test_send_payment_internal ( route, payment_hash, payment_secret, keysend_preimage, payment_id, recv_value_msat, onion_session_privs, & self . node_signer , best_block_height,
2635
- |path, payment_params , payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv|
2636
- self . send_payment_along_path ( path, payment_params , payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv) )
2635
+ |path, payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv|
2636
+ self . send_payment_along_path ( path, payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv) )
2637
2637
}
2638
2638
2639
2639
#[ cfg( test) ]
@@ -2685,8 +2685,8 @@ where
2685
2685
self . pending_outbound_payments . send_spontaneous_payment_with_route (
2686
2686
route, payment_preimage, payment_id, & self . entropy_source , & self . node_signer ,
2687
2687
best_block_height,
2688
- |path, payment_params , payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv|
2689
- self . send_payment_along_path ( path, payment_params , payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv) )
2688
+ |path, payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv|
2689
+ self . send_payment_along_path ( path, payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv) )
2690
2690
}
2691
2691
2692
2692
/// Similar to [`ChannelManager::send_spontaneous_payment`], but will automatically find a route
@@ -2703,8 +2703,8 @@ where
2703
2703
retry_strategy, route_params, & self . router , self . list_usable_channels ( ) ,
2704
2704
|| self . compute_inflight_htlcs ( ) , & self . entropy_source , & self . node_signer , best_block_height,
2705
2705
& self . logger , & self . pending_events ,
2706
- |path, payment_params , payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv|
2707
- self . send_payment_along_path ( path, payment_params , payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv) )
2706
+ |path, payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv|
2707
+ self . send_payment_along_path ( path, payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv) )
2708
2708
}
2709
2709
2710
2710
/// Send a payment that is probing the given route for liquidity. We calculate the
@@ -2714,8 +2714,8 @@ where
2714
2714
let best_block_height = self . best_block . read ( ) . unwrap ( ) . height ( ) ;
2715
2715
let _persistence_guard = PersistenceNotifierGuard :: notify_on_drop ( & self . total_consistency_lock , & self . persistence_notifier ) ;
2716
2716
self . pending_outbound_payments . send_probe ( hops, self . probing_cookie_secret , & self . entropy_source , & self . node_signer , best_block_height,
2717
- |path, payment_params , payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv|
2718
- self . send_payment_along_path ( path, payment_params , payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv) )
2717
+ |path, payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv|
2718
+ self . send_payment_along_path ( path, payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv) )
2719
2719
}
2720
2720
2721
2721
/// Returns whether a payment with the given [`PaymentHash`] and [`PaymentId`] is, in fact, a
@@ -3439,8 +3439,8 @@ where
3439
3439
self . pending_outbound_payments . check_retry_payments ( & self . router , || self . list_usable_channels ( ) ,
3440
3440
|| self . compute_inflight_htlcs ( ) , & self . entropy_source , & self . node_signer , best_block_height,
3441
3441
& self . pending_events , & self . logger ,
3442
- |path, payment_params , payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv|
3443
- self . send_payment_along_path ( path, payment_params , payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv) ) ;
3442
+ |path, payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv|
3443
+ self . send_payment_along_path ( path, payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv) ) ;
3444
3444
3445
3445
for ( htlc_source, payment_hash, failure_reason, destination) in failed_forwards. drain ( ..) {
3446
3446
self . fail_htlc_backwards_internal ( & htlc_source, & payment_hash, & failure_reason, destination) ;
@@ -7950,7 +7950,7 @@ mod tests {
7950
7950
// indicates there are more HTLCs coming.
7951
7951
let cur_height = CHAN_CONFIRM_DEPTH + 1 ; // route_payment calls send_payment, which adds 1 to the current height. So we do the same here to match.
7952
7952
let session_privs = nodes[ 0 ] . node . test_add_new_pending_payment ( our_payment_hash, Some ( payment_secret) , payment_id, & mpp_route) . unwrap ( ) ;
7953
- nodes[ 0 ] . node . test_send_payment_along_path ( & mpp_route. paths [ 0 ] , & route . payment_params , & our_payment_hash, & Some ( payment_secret) , 200_000 , cur_height, payment_id, & None , session_privs[ 0 ] ) . unwrap ( ) ;
7953
+ nodes[ 0 ] . node . test_send_payment_along_path ( & mpp_route. paths [ 0 ] , & our_payment_hash, & Some ( payment_secret) , 200_000 , cur_height, payment_id, & None , session_privs[ 0 ] ) . unwrap ( ) ;
7954
7954
check_added_monitors ! ( nodes[ 0 ] , 1 ) ;
7955
7955
let mut events = nodes[ 0 ] . node . get_and_clear_pending_msg_events ( ) ;
7956
7956
assert_eq ! ( events. len( ) , 1 ) ;
@@ -7980,7 +7980,7 @@ mod tests {
7980
7980
expect_payment_failed ! ( nodes[ 0 ] , our_payment_hash, true ) ;
7981
7981
7982
7982
// Send the second half of the original MPP payment.
7983
- nodes[ 0 ] . node . test_send_payment_along_path ( & mpp_route. paths [ 1 ] , & route . payment_params , & our_payment_hash, & Some ( payment_secret) , 200_000 , cur_height, payment_id, & None , session_privs[ 1 ] ) . unwrap ( ) ;
7983
+ nodes[ 0 ] . node . test_send_payment_along_path ( & mpp_route. paths [ 1 ] , & our_payment_hash, & Some ( payment_secret) , 200_000 , cur_height, payment_id, & None , session_privs[ 1 ] ) . unwrap ( ) ;
7984
7984
check_added_monitors ! ( nodes[ 0 ] , 1 ) ;
7985
7985
let mut events = nodes[ 0 ] . node . get_and_clear_pending_msg_events ( ) ;
7986
7986
assert_eq ! ( events. len( ) , 1 ) ;
0 commit comments