@@ -414,7 +414,7 @@ impl OutboundPayments {
414
414
u32 , PaymentId , & Option < PaymentPreimage > , [ u8 ; 32 ] ) -> Result < ( ) , APIError >
415
415
{
416
416
let onion_session_privs = self . add_new_pending_payment ( payment_hash, * payment_secret, payment_id, route, Retry :: Attempts ( 0 ) , None , entropy_source, best_block_height) ?;
417
- self . send_payment_internal ( route, payment_hash, payment_secret, None , payment_id, None ,
417
+ self . pay_route_internal ( route, payment_hash, payment_secret, None , payment_id, None ,
418
418
onion_session_privs, node_signer, best_block_height, & send_payment_along_path)
419
419
. map_err ( |e| { // TODO: use inspect_err instead when it's within MSRV
420
420
if let PaymentSendFailure :: AllFailedResendSafe ( _) = e {
@@ -441,7 +441,7 @@ impl OutboundPayments {
441
441
let payment_hash = PaymentHash ( Sha256 :: hash ( & preimage. 0 ) . into_inner ( ) ) ;
442
442
let onion_session_privs = self . add_new_pending_payment ( payment_hash, None , payment_id, & route, Retry :: Attempts ( 0 ) , None , entropy_source, best_block_height) ?;
443
443
444
- match self . send_payment_internal ( route, payment_hash, & None , Some ( preimage) , payment_id, None , onion_session_privs, node_signer, best_block_height, & send_payment_along_path) {
444
+ match self . pay_route_internal ( route, payment_hash, & None , Some ( preimage) , payment_id, None , onion_session_privs, node_signer, best_block_height, & send_payment_along_path) {
445
445
Ok ( ( ) ) => Ok ( payment_hash) ,
446
446
Err ( e) => {
447
447
if let PaymentSendFailure :: AllFailedResendSafe ( _) = e {
@@ -519,7 +519,7 @@ impl OutboundPayments {
519
519
520
520
let res = if let Some ( ( payment_hash, payment_secret, retry_strategy) ) = initial_send_info {
521
521
let onion_session_privs = self . add_new_pending_payment ( payment_hash, * payment_secret, payment_id, & route, retry_strategy, Some ( route_params. clone ( ) ) , entropy_source, best_block_height) ?;
522
- self . send_payment_internal ( & route, payment_hash, payment_secret, None , payment_id, None , onion_session_privs, node_signer, best_block_height, send_payment_along_path)
522
+ self . pay_route_internal ( & route, payment_hash, payment_secret, None , payment_id, None , onion_session_privs, node_signer, best_block_height, send_payment_along_path)
523
523
} else {
524
524
self . retry_payment_with_route ( & route, payment_id, entropy_source, node_signer, best_block_height, send_payment_along_path)
525
525
} ;
@@ -624,7 +624,7 @@ impl OutboundPayments {
624
624
} ) ) ,
625
625
}
626
626
} ;
627
- self . send_payment_internal ( route, payment_hash, & payment_secret, None , payment_id, Some ( total_msat) , onion_session_privs, node_signer, best_block_height, & send_payment_along_path)
627
+ self . pay_route_internal ( route, payment_hash, & payment_secret, None , payment_id, Some ( total_msat) , onion_session_privs, node_signer, best_block_height, & send_payment_along_path)
628
628
}
629
629
630
630
pub ( super ) fn send_probe < ES : Deref , NS : Deref , F > (
@@ -650,7 +650,7 @@ impl OutboundPayments {
650
650
let route = Route { paths : vec ! [ hops] , payment_params : None } ;
651
651
let onion_session_privs = self . add_new_pending_payment ( payment_hash, None , payment_id, & route, Retry :: Attempts ( 0 ) , None , entropy_source, best_block_height) ?;
652
652
653
- match self . send_payment_internal ( & route, payment_hash, & None , None , payment_id, None , onion_session_privs, node_signer, best_block_height, & send_payment_along_path) {
653
+ match self . pay_route_internal ( & route, payment_hash, & None , None , payment_id, None , onion_session_privs, node_signer, best_block_height, & send_payment_along_path) {
654
654
Ok ( ( ) ) => Ok ( ( payment_hash, payment_id) ) ,
655
655
Err ( e) => {
656
656
if let PaymentSendFailure :: AllFailedResendSafe ( _) = e {
@@ -705,7 +705,7 @@ impl OutboundPayments {
705
705
}
706
706
}
707
707
708
- fn send_payment_internal < NS : Deref , F > (
708
+ fn pay_route_internal < NS : Deref , F > (
709
709
& self , route : & Route , payment_hash : PaymentHash , payment_secret : & Option < PaymentSecret > ,
710
710
keysend_preimage : Option < PaymentPreimage > , payment_id : PaymentId , recv_value_msat : Option < u64 > ,
711
711
onion_session_privs : Vec < [ u8 ; 32 ] > , node_signer : & NS , best_block_height : u32 ,
@@ -822,7 +822,7 @@ impl OutboundPayments {
822
822
F : Fn ( & Vec < RouteHop > , & Option < PaymentParameters > , & PaymentHash , & Option < PaymentSecret > , u64 ,
823
823
u32 , PaymentId , & Option < PaymentPreimage > , [ u8 ; 32 ] ) -> Result < ( ) , APIError >
824
824
{
825
- self . send_payment_internal ( route, payment_hash, payment_secret, keysend_preimage, payment_id,
825
+ self . pay_route_internal ( route, payment_hash, payment_secret, keysend_preimage, payment_id,
826
826
recv_value_msat, onion_session_privs, node_signer, best_block_height,
827
827
& send_payment_along_path)
828
828
. map_err ( |e| { // TODO: use inspect_err instead when it's within MSRV
0 commit comments