@@ -75,7 +75,7 @@ pub struct DefaultRouter<
7575}
7676
7777/// Default number of Dummy Hops
78- pub const DEFAULT_PAYMENT_DUMMY_HOPS : usize = 0 ;
78+ pub const DEFAULT_PAYMENT_DUMMY_HOPS : usize = 3 ;
7979
8080impl <
8181 G : Deref < Target = NetworkGraph < L > > ,
@@ -201,9 +201,9 @@ where
201201 } )
202202 } )
203203 . map ( |forward_node| {
204- BlindedPaymentPath :: new (
205- & [ forward_node] , recipient, receive_auth_key, tlvs. clone ( ) , u64:: MAX , MIN_FINAL_CLTV_EXPIRY_DELTA ,
206- & * self . entropy_source , secp_ctx
204+ BlindedPaymentPath :: new_with_dummy_hops (
205+ & [ forward_node] , recipient, DEFAULT_PAYMENT_DUMMY_HOPS , receive_auth_key, tlvs. clone ( ) , u64:: MAX ,
206+ MIN_FINAL_CLTV_EXPIRY_DELTA , & * self . entropy_source , secp_ctx
207207 )
208208 } )
209209 . take ( MAX_PAYMENT_PATHS )
@@ -213,9 +213,9 @@ where
213213 Ok ( paths) if !paths. is_empty ( ) => Ok ( paths) ,
214214 _ => {
215215 if network_graph. nodes ( ) . contains_key ( & NodeId :: from_pubkey ( & recipient) ) {
216- BlindedPaymentPath :: new (
217- & [ ] , recipient, receive_auth_key, tlvs, u64:: MAX , MIN_FINAL_CLTV_EXPIRY_DELTA , & * self . entropy_source ,
218- secp_ctx
216+ BlindedPaymentPath :: new_with_dummy_hops (
217+ & [ ] , recipient, DEFAULT_PAYMENT_DUMMY_HOPS , receive_auth_key, tlvs, u64:: MAX ,
218+ MIN_FINAL_CLTV_EXPIRY_DELTA , & * self . entropy_source , secp_ctx
219219 ) . map ( |path| vec ! [ path] )
220220 } else {
221221 Err ( ( ) )
0 commit comments