@@ -711,7 +711,7 @@ impl OutboundPayments {
711
711
}
712
712
core:: mem:: drop ( outbounds) ;
713
713
if let Some ( ( payment_hash, payment_id, route_params) ) = retry_id_route_params {
714
- self . retry_payment_internal ( payment_hash, payment_id, route_params, router, first_hops ( ) , & inflight_htlcs, entropy_source, node_signer, best_block_height, logger, pending_events, & send_payment_along_path)
714
+ self . find_route_and_send_payment ( payment_hash, payment_id, route_params, router, first_hops ( ) , & inflight_htlcs, entropy_source, node_signer, best_block_height, logger, pending_events, & send_payment_along_path)
715
715
} else { break }
716
716
}
717
717
@@ -797,7 +797,7 @@ impl OutboundPayments {
797
797
Ok ( ( ) )
798
798
}
799
799
800
- fn retry_payment_internal < R : Deref , NS : Deref , ES : Deref , IH , SP , L : Deref > (
800
+ fn find_route_and_send_payment < R : Deref , NS : Deref , ES : Deref , IH , SP , L : Deref > (
801
801
& self , payment_hash : PaymentHash , payment_id : PaymentId , route_params : RouteParameters ,
802
802
router : & R , first_hops : Vec < ChannelDetails > , inflight_htlcs : & IH , entropy_source : & ES ,
803
803
node_signer : & NS , best_block_height : u32 , logger : & L ,
@@ -950,14 +950,14 @@ impl OutboundPayments {
950
950
match err {
951
951
PaymentSendFailure :: AllFailedResendSafe ( errs) => {
952
952
Self :: push_path_failed_evs_and_scids ( payment_id, payment_hash, & mut route_params, route. paths , errs. into_iter ( ) . map ( |e| Err ( e) ) , logger, pending_events) ;
953
- self . retry_payment_internal ( payment_hash, payment_id, route_params, router, first_hops, inflight_htlcs, entropy_source, node_signer, best_block_height, logger, pending_events, send_payment_along_path) ;
953
+ self . find_route_and_send_payment ( payment_hash, payment_id, route_params, router, first_hops, inflight_htlcs, entropy_source, node_signer, best_block_height, logger, pending_events, send_payment_along_path) ;
954
954
} ,
955
955
PaymentSendFailure :: PartialFailure { failed_paths_retry : Some ( mut retry) , results, .. } => {
956
956
Self :: push_path_failed_evs_and_scids ( payment_id, payment_hash, & mut retry, route. paths , results. into_iter ( ) , logger, pending_events) ;
957
957
// Some paths were sent, even if we failed to send the full MPP value our recipient may
958
958
// misbehave and claim the funds, at which point we have to consider the payment sent, so
959
959
// return `Ok()` here, ignoring any retry errors.
960
- self . retry_payment_internal ( payment_hash, payment_id, retry, router, first_hops, inflight_htlcs, entropy_source, node_signer, best_block_height, logger, pending_events, send_payment_along_path) ;
960
+ self . find_route_and_send_payment ( payment_hash, payment_id, retry, router, first_hops, inflight_htlcs, entropy_source, node_signer, best_block_height, logger, pending_events, send_payment_along_path) ;
961
961
} ,
962
962
PaymentSendFailure :: PartialFailure { failed_paths_retry : None , .. } => {
963
963
// This may happen if we send a payment and some paths fail, but only due to a temporary
@@ -1659,7 +1659,7 @@ mod tests {
1659
1659
PaymentId ( [ 0 ; 32 ] ) , None , & Route { paths : vec ! [ ] , payment_params : None } ,
1660
1660
Some ( Retry :: Attempts ( 1 ) ) , Some ( expired_route_params. payment_params . clone ( ) ) ,
1661
1661
& & keys_manager, 0 ) . unwrap ( ) ;
1662
- outbound_payments. retry_payment_internal (
1662
+ outbound_payments. find_route_and_send_payment (
1663
1663
PaymentHash ( [ 0 ; 32 ] ) , PaymentId ( [ 0 ; 32 ] ) , expired_route_params, & & router, vec ! [ ] ,
1664
1664
& || InFlightHtlcs :: new ( ) , & & keys_manager, & & keys_manager, 0 , & & logger, & pending_events,
1665
1665
& |_| Ok ( ( ) ) ) ;
@@ -1706,7 +1706,7 @@ mod tests {
1706
1706
PaymentId ( [ 0 ; 32 ] ) , None , & Route { paths : vec ! [ ] , payment_params : None } ,
1707
1707
Some ( Retry :: Attempts ( 1 ) ) , Some ( route_params. payment_params . clone ( ) ) ,
1708
1708
& & keys_manager, 0 ) . unwrap ( ) ;
1709
- outbound_payments. retry_payment_internal (
1709
+ outbound_payments. find_route_and_send_payment (
1710
1710
PaymentHash ( [ 0 ; 32 ] ) , PaymentId ( [ 0 ; 32 ] ) , route_params, & & router, vec ! [ ] ,
1711
1711
& || InFlightHtlcs :: new ( ) , & & keys_manager, & & keys_manager, 0 , & & logger, & pending_events,
1712
1712
& |_| Ok ( ( ) ) ) ;
0 commit comments