@@ -1952,16 +1952,17 @@ where
1952
1952
/// # use lightning::events::{Event, EventsProvider};
1953
1953
/// # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, Retry};
1954
1954
/// # use lightning::offers::parse::Bolt12SemanticError;
1955
+ /// # use lightning::routing::router::RouteParametersConfig;
1955
1956
/// #
1956
1957
/// # fn example<T: AChannelManager>(
1957
1958
/// # channel_manager: T, amount_msats: u64, absolute_expiry: Duration, retry: Retry,
1958
- /// # max_total_routing_fee_msat : Option<u64 >
1959
+ /// # route_params_config : Option<RouteParametersConfig >
1959
1960
/// # ) -> Result<(), Bolt12SemanticError> {
1960
1961
/// # let channel_manager = channel_manager.get_cm();
1961
1962
/// let payment_id = PaymentId([42; 32]);
1962
1963
/// let refund = channel_manager
1963
1964
/// .create_refund_builder(
1964
- /// amount_msats, absolute_expiry, payment_id, retry, max_total_routing_fee_msat
1965
+ /// amount_msats, absolute_expiry, payment_id, retry, route_params_config
1965
1966
/// )?
1966
1967
/// # ;
1967
1968
/// # // Needed for compiling for c_bindings
@@ -9189,7 +9190,7 @@ macro_rules! create_refund_builder { ($self: ident, $builder: ty) => {
9189
9190
/// [Avoiding Duplicate Payments]: #avoiding-duplicate-payments
9190
9191
pub fn create_refund_builder(
9191
9192
&$self, amount_msats: u64, absolute_expiry: Duration, payment_id: PaymentId,
9192
- retry_strategy: Retry, max_total_routing_fee_msat : Option<u64 >
9193
+ retry_strategy: Retry, route_params_config : Option<RouteParametersConfig >
9193
9194
) -> Result<$builder, Bolt12SemanticError> {
9194
9195
let node_id = $self.get_our_node_id();
9195
9196
let expanded_key = &$self.inbound_payment_key;
@@ -9211,11 +9212,6 @@ macro_rules! create_refund_builder { ($self: ident, $builder: ty) => {
9211
9212
9212
9213
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop($self);
9213
9214
9214
- let route_params_config = max_total_routing_fee_msat.map(
9215
- |fee_msat| RouteParametersConfig::new()
9216
- .with_max_total_routing_fee_msat(fee_msat)
9217
- );
9218
-
9219
9215
let expiration = StaleExpiration::AbsoluteTimeout(absolute_expiry);
9220
9216
$self.pending_outbound_payments
9221
9217
.add_new_awaiting_invoice(
0 commit comments