@@ -271,10 +271,10 @@ impl OutboundPayments {
271271 }
272272 }
273273
274- pub ( super ) fn send_payment < K : Deref , F > ( & self , route : & Route , payment_hash : PaymentHash ,
275- payment_secret : & Option < PaymentSecret > , payment_id : PaymentId , keys_manager : & K ,
276- best_block_height : u32 , send_payment_along_path : F )
277- -> Result < ( ) , PaymentSendFailure >
274+ pub ( super ) fn send_payment < K : Deref , F > (
275+ & self , route : & Route , payment_hash : PaymentHash , payment_secret : & Option < PaymentSecret > ,
276+ payment_id : PaymentId , keys_manager : & K , best_block_height : u32 , send_payment_along_path : F
277+ ) -> Result < ( ) , PaymentSendFailure >
278278 where
279279 K :: Target : KeysInterface ,
280280 F : Fn ( & Vec < RouteHop > , & Option < PaymentParameters > , & PaymentHash , & Option < PaymentSecret > , u64 ,
@@ -284,10 +284,10 @@ impl OutboundPayments {
284284 self . send_payment_internal ( route, payment_hash, payment_secret, None , payment_id, None , onion_session_privs, keys_manager, best_block_height, send_payment_along_path)
285285 }
286286
287- pub ( super ) fn send_spontaneous_payment < K : Deref , F > ( & self , route : & Route ,
288- payment_preimage : Option < PaymentPreimage > , payment_id : PaymentId , keys_manager : & K ,
289- best_block_height : u32 , send_payment_along_path : F )
290- -> Result < PaymentHash , PaymentSendFailure >
287+ pub ( super ) fn send_spontaneous_payment < K : Deref , F > (
288+ & self , route : & Route , payment_preimage : Option < PaymentPreimage > , payment_id : PaymentId ,
289+ keys_manager : & K , best_block_height : u32 , send_payment_along_path : F
290+ ) -> Result < PaymentHash , PaymentSendFailure >
291291 where
292292 K :: Target : KeysInterface ,
293293 F : Fn ( & Vec < RouteHop > , & Option < PaymentParameters > , & PaymentHash , & Option < PaymentSecret > , u64 ,
@@ -306,9 +306,10 @@ impl OutboundPayments {
306306 }
307307 }
308308
309- pub ( super ) fn retry_payment < K : Deref , F > ( & self , route : & Route , payment_id : PaymentId ,
310- keys_manager : & K , best_block_height : u32 , send_payment_along_path : F )
311- -> Result < ( ) , PaymentSendFailure >
309+ pub ( super ) fn retry_payment < K : Deref , F > (
310+ & self , route : & Route , payment_id : PaymentId , keys_manager : & K , best_block_height : u32 ,
311+ send_payment_along_path : F
312+ ) -> Result < ( ) , PaymentSendFailure >
312313 where
313314 K :: Target : KeysInterface ,
314315 F : Fn ( & Vec < RouteHop > , & Option < PaymentParameters > , & PaymentHash , & Option < PaymentSecret > , u64 ,
@@ -374,9 +375,10 @@ impl OutboundPayments {
374375 self . send_payment_internal ( route, payment_hash, & payment_secret, None , payment_id, Some ( total_msat) , onion_session_privs, keys_manager, best_block_height, send_payment_along_path)
375376 }
376377
377- pub ( super ) fn send_probe < K : Deref , F > ( & self , hops : Vec < RouteHop > , probing_cookie_secret : [ u8 ; 32 ] ,
378- keys_manager : & K , best_block_height : u32 , send_payment_along_path : F )
379- -> Result < ( PaymentHash , PaymentId ) , PaymentSendFailure >
378+ pub ( super ) fn send_probe < K : Deref , F > (
379+ & self , hops : Vec < RouteHop > , probing_cookie_secret : [ u8 ; 32 ] , keys_manager : & K ,
380+ best_block_height : u32 , send_payment_along_path : F
381+ ) -> Result < ( PaymentHash , PaymentId ) , PaymentSendFailure >
380382 where
381383 K :: Target : KeysInterface ,
382384 F : Fn ( & Vec < RouteHop > , & Option < PaymentParameters > , & PaymentHash , & Option < PaymentSecret > , u64 ,
@@ -401,10 +403,10 @@ impl OutboundPayments {
401403 }
402404 }
403405
404- pub ( super ) fn add_new_pending_payment < K : Deref > ( & self , payment_hash : PaymentHash ,
405- payment_secret : Option < PaymentSecret > , payment_id : PaymentId , route : & Route , keys_manager : & K ,
406- best_block_height : u32 )
407- -> Result < Vec < [ u8 ; 32 ] > , PaymentSendFailure > where K :: Target : KeysInterface {
406+ pub ( super ) fn add_new_pending_payment < K : Deref > (
407+ & self , payment_hash : PaymentHash , payment_secret : Option < PaymentSecret > , payment_id : PaymentId ,
408+ route : & Route , keys_manager : & K , best_block_height : u32
409+ ) -> Result < Vec < [ u8 ; 32 ] > , PaymentSendFailure > where K :: Target : KeysInterface {
408410 let mut onion_session_privs = Vec :: with_capacity ( route. paths . len ( ) ) ;
409411 for _ in 0 ..route. paths . len ( ) {
410412 onion_session_privs. push ( keys_manager. get_secure_random_bytes ( ) ) ;
@@ -433,8 +435,8 @@ impl OutboundPayments {
433435 }
434436 }
435437
436- fn send_payment_internal < K : Deref , F >
437- ( & self , route : & Route , payment_hash : PaymentHash , payment_secret : & Option < PaymentSecret > ,
438+ fn send_payment_internal < K : Deref , F > (
439+ & self , route : & Route , payment_hash : PaymentHash , payment_secret : & Option < PaymentSecret > ,
438440 keysend_preimage : Option < PaymentPreimage > , payment_id : PaymentId , recv_value_msat : Option < u64 > ,
439441 onion_session_privs : Vec < [ u8 ; 32 ] > , keys_manager : & K , best_block_height : u32 ,
440442 send_payment_along_path : F ) -> Result < ( ) , PaymentSendFailure >
@@ -542,11 +544,11 @@ impl OutboundPayments {
542544 }
543545
544546 #[ cfg( test) ]
545- pub ( super ) fn test_send_payment_internal < K : Deref , F >
546- ( & self , route : & Route , payment_hash : PaymentHash , payment_secret : & Option < PaymentSecret > ,
547- keysend_preimage : Option < PaymentPreimage > , payment_id : PaymentId , recv_value_msat : Option < u64 > ,
548- onion_session_privs : Vec < [ u8 ; 32 ] > , keys_manager : & K , best_block_height : u32 ,
549- send_payment_along_path : F ) -> Result < ( ) , PaymentSendFailure >
547+ pub ( super ) fn test_send_payment_internal < K : Deref , F > (
548+ & self , route : & Route , payment_hash : PaymentHash , payment_secret : & Option < PaymentSecret > ,
549+ keysend_preimage : Option < PaymentPreimage > , payment_id : PaymentId , recv_value_msat : Option < u64 > ,
550+ onion_session_privs : Vec < [ u8 ; 32 ] > , keys_manager : & K , best_block_height : u32 ,
551+ send_payment_along_path : F ) -> Result < ( ) , PaymentSendFailure >
550552 where
551553 K :: Target : KeysInterface ,
552554 F : Fn ( & Vec < RouteHop > , & Option < PaymentParameters > , & PaymentHash , & Option < PaymentSecret > , u64 ,
@@ -557,9 +559,9 @@ impl OutboundPayments {
557559 send_payment_along_path)
558560 }
559561
560- pub ( super ) fn claim_htlc < L : Deref > ( & self , payment_id : PaymentId ,
561- payment_preimage : PaymentPreimage , session_priv : SecretKey , path : Vec < RouteHop > ,
562- from_onchain : bool , pending_events : & Mutex < Vec < events:: Event > > , logger : & L )
562+ pub ( super ) fn claim_htlc < L : Deref > (
563+ & self , payment_id : PaymentId , payment_preimage : PaymentPreimage , session_priv : SecretKey ,
564+ path : Vec < RouteHop > , from_onchain : bool , pending_events : & Mutex < Vec < events:: Event > > , logger : & L )
563565 where L :: Target : Logger {
564566 let mut session_priv_bytes = [ 0 ; 32 ] ;
565567 session_priv_bytes. copy_from_slice ( & session_priv[ ..] ) ;
@@ -665,11 +667,11 @@ impl OutboundPayments {
665667 } ) ;
666668 }
667669
668- pub ( super ) fn fail_htlc < L : Deref > ( & self , source : & HTLCSource , payment_hash : & PaymentHash ,
669- onion_error : & HTLCFailReason , path : & Vec < RouteHop > , session_priv : & SecretKey ,
670- payment_id : & PaymentId , payment_params : & Option < PaymentParameters > ,
671- probing_cookie_secret : [ u8 ; 32 ] , secp_ctx : & Secp256k1 < secp256k1 :: All > ,
672- pending_events : & Mutex < Vec < events:: Event > > , logger : & L )
670+ pub ( super ) fn fail_htlc < L : Deref > (
671+ & self , source : & HTLCSource , payment_hash : & PaymentHash , onion_error : & HTLCFailReason ,
672+ path : & Vec < RouteHop > , session_priv : & SecretKey , payment_id : & PaymentId ,
673+ payment_params : & Option < PaymentParameters > , probing_cookie_secret : [ u8 ; 32 ] ,
674+ secp_ctx : & Secp256k1 < secp256k1 :: All > , pending_events : & Mutex < Vec < events:: Event > > , logger : & L )
673675 where L :: Target : Logger {
674676 let mut session_priv_bytes = [ 0 ; 32 ] ;
675677 session_priv_bytes. copy_from_slice ( & session_priv[ ..] ) ;
0 commit comments