@@ -1039,7 +1039,7 @@ pub struct RouteParametersConfig {
1039
1039
/// paths.
1040
1040
///
1041
1041
/// Note that values below a few sats may result in some paths being spuriously ignored.
1042
- ///
1042
+ ///
1043
1043
/// Defaults to 1% of the payment amount + 50 sats
1044
1044
pub max_total_routing_fee_msat : Option < u64 > ,
1045
1045
@@ -1075,16 +1075,6 @@ impl_writeable_tlv_based!(RouteParametersConfig, {
1075
1075
} ) ;
1076
1076
1077
1077
impl 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
-
1088
1078
/// Set the maximum total fees, in millisatoshi, that may accrue during route finding.
1089
1079
///
1090
1080
/// This is not exported to bindings users since bindings don't support move semantics
@@ -1115,6 +1105,18 @@ impl RouteParametersConfig {
1115
1105
}
1116
1106
}
1117
1107
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
+
1118
1120
/// The recipient of a payment, differing based on whether they've hidden their identity with route
1119
1121
/// blinding.
1120
1122
#[ derive( Clone , Debug , Hash , PartialEq , Eq ) ]
0 commit comments