@@ -711,7 +711,7 @@ impl OutboundPayments {
711711 }
712712 core:: mem:: drop ( outbounds) ;
713713 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)
715715 } else { break }
716716 }
717717
@@ -797,7 +797,7 @@ impl OutboundPayments {
797797 Ok ( ( ) )
798798 }
799799
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 > (
801801 & self , payment_hash : PaymentHash , payment_id : PaymentId , route_params : RouteParameters ,
802802 router : & R , first_hops : Vec < ChannelDetails > , inflight_htlcs : & IH , entropy_source : & ES ,
803803 node_signer : & NS , best_block_height : u32 , logger : & L ,
@@ -950,14 +950,14 @@ impl OutboundPayments {
950950 match err {
951951 PaymentSendFailure :: AllFailedResendSafe ( errs) => {
952952 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) ;
954954 } ,
955955 PaymentSendFailure :: PartialFailure { failed_paths_retry : Some ( mut retry) , results, .. } => {
956956 Self :: push_path_failed_evs_and_scids ( payment_id, payment_hash, & mut retry, route. paths , results. into_iter ( ) , logger, pending_events) ;
957957 // Some paths were sent, even if we failed to send the full MPP value our recipient may
958958 // misbehave and claim the funds, at which point we have to consider the payment sent, so
959959 // 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) ;
961961 } ,
962962 PaymentSendFailure :: PartialFailure { failed_paths_retry : None , .. } => {
963963 // This may happen if we send a payment and some paths fail, but only due to a temporary
@@ -1661,7 +1661,7 @@ mod tests {
16611661 PaymentId ( [ 0 ; 32 ] ) , None , & Route { paths : vec ! [ ] , route_params : None } ,
16621662 Some ( Retry :: Attempts ( 1 ) ) , Some ( expired_route_params. payment_params . clone ( ) ) ,
16631663 & & keys_manager, 0 ) . unwrap ( ) ;
1664- outbound_payments. retry_payment_internal (
1664+ outbound_payments. find_route_and_send_payment (
16651665 PaymentHash ( [ 0 ; 32 ] ) , PaymentId ( [ 0 ; 32 ] ) , expired_route_params, & & router, vec ! [ ] ,
16661666 & || InFlightHtlcs :: new ( ) , & & keys_manager, & & keys_manager, 0 , & & logger, & pending_events,
16671667 & |_| Ok ( ( ) ) ) ;
@@ -1705,7 +1705,7 @@ mod tests {
17051705 PaymentId ( [ 0 ; 32 ] ) , None , & Route { paths : vec ! [ ] , route_params : None } ,
17061706 Some ( Retry :: Attempts ( 1 ) ) , Some ( route_params. payment_params . clone ( ) ) ,
17071707 & & keys_manager, 0 ) . unwrap ( ) ;
1708- outbound_payments. retry_payment_internal (
1708+ outbound_payments. find_route_and_send_payment (
17091709 PaymentHash ( [ 0 ; 32 ] ) , PaymentId ( [ 0 ; 32 ] ) , route_params, & & router, vec ! [ ] ,
17101710 & || InFlightHtlcs :: new ( ) , & & keys_manager, & & keys_manager, 0 , & & logger, & pending_events,
17111711 & |_| Ok ( ( ) ) ) ;
0 commit comments