@@ -71,10 +71,8 @@ impl Bolt11Payment {
7171
7272 /// Send a payment given an invoice.
7373 ///
74- /// If [`SendingParameters`] are provided they will override the node's default routing parameters
75- /// on a per-field basis. Each field in `SendingParameters` that is set replaces the corresponding
76- /// default value. Fields that are not set fall back to the node's configured defaults. If no
77- /// `SendingParameters` are provided, the method fully relies on these defaults.
74+ /// If `sending_parameters` are provided they will override the default as well as the
75+ /// node-wide parameters configured via [`Config::sending_parameters`] on a per-field basis.
7876 pub fn send (
7977 & self , invoice : & Bolt11Invoice , sending_parameters : Option < SendingParameters > ,
8078 ) -> Result < PaymentId , Error > {
@@ -99,9 +97,7 @@ impl Bolt11Payment {
9997 }
10098
10199 if let Some ( user_set_params) = sending_parameters {
102- if let Some ( mut default_params) =
103- self . config . sending_parameters_config . as_ref ( ) . cloned ( )
104- {
100+ if let Some ( mut default_params) = self . config . sending_parameters . as_ref ( ) . cloned ( ) {
105101 default_params. max_total_routing_fee_msat = user_set_params
106102 . max_total_routing_fee_msat
107103 . or ( default_params. max_total_routing_fee_msat ) ;
@@ -122,7 +118,7 @@ impl Bolt11Payment {
122118 route_params. payment_params . max_channel_saturation_power_of_half =
123119 default_params. max_channel_saturation_power_of_half . unwrap_or_default ( ) ;
124120 }
125- } else if let Some ( default_params) = & self . config . sending_parameters_config {
121+ } else if let Some ( default_params) = & self . config . sending_parameters {
126122 route_params. max_total_routing_fee_msat = default_params. max_total_routing_fee_msat ;
127123 route_params. payment_params . max_total_cltv_expiry_delta =
128124 default_params. max_total_cltv_expiry_delta . unwrap_or_default ( ) ;
@@ -197,10 +193,8 @@ impl Bolt11Payment {
197193 /// This can be used to pay a so-called "zero-amount" invoice, i.e., an invoice that leaves the
198194 /// amount paid to be determined by the user.
199195 ///
200- /// If [`SendingParameters`] are provided they will override the node's default routing parameters
201- /// on a per-field basis. Each field in `SendingParameters` that is set replaces the corresponding
202- /// default value. Fields that are not set fall back to the node's configured defaults. If no
203- /// `SendingParameters` are provided, the method fully relies on these defaults.
196+ /// If `sending_parameters` are provided they will override the default as well as the
197+ /// node-wide parameters configured via [`Config::sending_parameters`] on a per-field basis.
204198 pub fn send_using_amount (
205199 & self , invoice : & Bolt11Invoice , amount_msat : u64 ,
206200 sending_parameters : Option < SendingParameters > ,
@@ -248,9 +242,7 @@ impl Bolt11Payment {
248242 RouteParameters :: from_payment_params_and_value ( payment_params, amount_msat) ;
249243
250244 if let Some ( user_set_params) = sending_parameters {
251- if let Some ( mut default_params) =
252- self . config . sending_parameters_config . as_ref ( ) . cloned ( )
253- {
245+ if let Some ( mut default_params) = self . config . sending_parameters . as_ref ( ) . cloned ( ) {
254246 default_params. max_total_routing_fee_msat = user_set_params
255247 . max_total_routing_fee_msat
256248 . or ( default_params. max_total_routing_fee_msat ) ;
@@ -271,7 +263,7 @@ impl Bolt11Payment {
271263 route_params. payment_params . max_channel_saturation_power_of_half =
272264 default_params. max_channel_saturation_power_of_half . unwrap_or_default ( ) ;
273265 }
274- } else if let Some ( default_params) = & self . config . sending_parameters_config {
266+ } else if let Some ( default_params) = & self . config . sending_parameters {
275267 route_params. max_total_routing_fee_msat = default_params. max_total_routing_fee_msat ;
276268 route_params. payment_params . max_total_cltv_expiry_delta =
277269 default_params. max_total_cltv_expiry_delta . unwrap_or_default ( ) ;
0 commit comments