@@ -359,7 +359,7 @@ impl OutboundPayments {
359
359
F : Fn ( & Vec < RouteHop > , & Option < PaymentParameters > , & PaymentHash , & Option < PaymentSecret > , u64 ,
360
360
u32 , PaymentId , & Option < PaymentPreimage > , [ u8 ; 32 ] ) -> Result < ( ) , APIError >
361
361
{
362
- let onion_session_privs = self . add_new_pending_payment ( payment_hash, * payment_secret, payment_id, route, entropy_source, best_block_height) ?;
362
+ 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) ?;
363
363
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)
364
364
}
365
365
@@ -378,7 +378,7 @@ impl OutboundPayments {
378
378
None => PaymentPreimage ( entropy_source. get_secure_random_bytes ( ) ) ,
379
379
} ;
380
380
let payment_hash = PaymentHash ( Sha256 :: hash ( & preimage. 0 ) . into_inner ( ) ) ;
381
- let onion_session_privs = self . add_new_pending_payment ( payment_hash, None , payment_id, & route, entropy_source, best_block_height) ?;
381
+ let onion_session_privs = self . add_new_pending_payment ( payment_hash, None , payment_id, & route, Retry :: Attempts ( 0 ) , None , entropy_source, best_block_height) ?;
382
382
383
383
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) {
384
384
Ok ( ( ) ) => Ok ( payment_hash) ,
@@ -477,7 +477,7 @@ impl OutboundPayments {
477
477
}
478
478
479
479
let route = Route { paths : vec ! [ hops] , payment_params : None } ;
480
- let onion_session_privs = self . add_new_pending_payment ( payment_hash, None , payment_id, & route, entropy_source, best_block_height) ?;
480
+ let onion_session_privs = self . add_new_pending_payment ( payment_hash, None , payment_id, & route, Retry :: Attempts ( 0 ) , None , entropy_source, best_block_height) ?;
481
481
482
482
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) {
483
483
Ok ( ( ) ) => Ok ( ( payment_hash, payment_id) ) ,
@@ -488,14 +488,15 @@ impl OutboundPayments {
488
488
#[ cfg( test) ]
489
489
pub ( super ) fn test_add_new_pending_payment < ES : Deref > (
490
490
& self , payment_hash : PaymentHash , payment_secret : Option < PaymentSecret > , payment_id : PaymentId ,
491
- route : & Route , entropy_source : & ES , best_block_height : u32
491
+ route : & Route , retry_strategy : Retry , entropy_source : & ES , best_block_height : u32
492
492
) -> Result < Vec < [ u8 ; 32 ] > , PaymentSendFailure > where ES :: Target : EntropySource {
493
- self . add_new_pending_payment ( payment_hash, payment_secret, payment_id, route, entropy_source, best_block_height)
493
+ self . add_new_pending_payment ( payment_hash, payment_secret, payment_id, route, retry_strategy , None , entropy_source, best_block_height)
494
494
}
495
495
496
496
pub ( super ) fn add_new_pending_payment < ES : Deref > (
497
497
& self , payment_hash : PaymentHash , payment_secret : Option < PaymentSecret > , payment_id : PaymentId ,
498
- route : & Route , entropy_source : & ES , best_block_height : u32
498
+ route : & Route , retry_strategy : Retry , route_params : Option < RouteParameters > ,
499
+ entropy_source : & ES , best_block_height : u32
499
500
) -> Result < Vec < [ u8 ; 32 ] > , PaymentSendFailure > where ES :: Target : EntropySource {
500
501
let mut onion_session_privs = Vec :: with_capacity ( route. paths . len ( ) ) ;
501
502
for _ in 0 ..route. paths . len ( ) {
0 commit comments