@@ -1039,7 +1039,7 @@ pub struct RouteParametersConfig {
10391039 /// paths.
10401040 ///
10411041 /// Note that values below a few sats may result in some paths being spuriously ignored.
1042- ///
1042+ ///
10431043 /// Defaults to 1% of the payment amount + 50 sats
10441044 pub max_total_routing_fee_msat : Option < u64 > ,
10451045
@@ -1075,16 +1075,6 @@ impl_writeable_tlv_based!(RouteParametersConfig, {
10751075} ) ;
10761076
10771077impl RouteParametersConfig {
1078- /// Initates an new set of route parameter configs with default parameters.
1079- pub fn new ( ) -> Self {
1080- Self {
1081- max_total_routing_fee_msat : None ,
1082- max_total_cltv_expiry_delta : DEFAULT_MAX_TOTAL_CLTV_EXPIRY_DELTA ,
1083- max_path_count : DEFAULT_MAX_PATH_COUNT ,
1084- max_channel_saturation_power_of_half : DEFAULT_MAX_CHANNEL_SATURATION_POW_HALF ,
1085- }
1086- }
1087-
10881078 /// Set the maximum total fees, in millisatoshi, that may accrue during route finding.
10891079 ///
10901080 /// This is not exported to bindings users since bindings don't support move semantics
@@ -1115,6 +1105,18 @@ impl RouteParametersConfig {
11151105 }
11161106}
11171107
1108+ impl Default for RouteParametersConfig {
1109+ /// Initates an new set of route parameter configs with default parameters.
1110+ fn default ( ) -> Self {
1111+ Self {
1112+ max_total_routing_fee_msat : None ,
1113+ max_total_cltv_expiry_delta : DEFAULT_MAX_TOTAL_CLTV_EXPIRY_DELTA ,
1114+ max_path_count : DEFAULT_MAX_PATH_COUNT ,
1115+ max_channel_saturation_power_of_half : DEFAULT_MAX_CHANNEL_SATURATION_POW_HALF ,
1116+ }
1117+ }
1118+ }
1119+
11181120/// The recipient of a payment, differing based on whether they've hidden their identity with route
11191121/// blinding.
11201122#[ derive( Clone , Debug , Hash , PartialEq , Eq ) ]
0 commit comments