pub struct RouteParametersConfig {
pub max_total_routing_fee_msat: Option<u64>,
pub max_total_cltv_expiry_delta: u32,
pub max_path_count: u8,
pub max_channel_saturation_power_of_half: u8,
}Expand description
A struct for configuring parameters for routing the payment.
Fields§
§max_total_routing_fee_msat: Option<u64>The maximum total fees, in millisatoshi, that may accrue during route finding.
This limit also applies to the total fees that may arise while retrying failed payment paths.
Note that values below a few sats may result in some paths being spuriously ignored.
Defaults to 1% of the payment amount + 50 sats
max_total_cltv_expiry_delta: u32The maximum total CLTV delta we accept for the route.
Defaults to DEFAULT_MAX_TOTAL_CLTV_EXPIRY_DELTA.
max_path_count: u8The maximum number of paths that may be used by (MPP) payments.
Defaults to DEFAULT_MAX_PATH_COUNT.
max_channel_saturation_power_of_half: u8Selects the maximum share of a channel’s total capacity which will be sent over a channel, as a power of 1/2. A higher value prefers to send the payment using more MPP parts whereas a lower value prefers to send larger MPP parts, potentially saturating channels and increasing failure probability for those paths.
Note that this restriction will be relaxed during pathfinding after paths which meet this restriction have been found. While paths which meet this criteria will be searched for, it is ultimately up to the scorer to select them over other paths.
A value of 0 will allow payments up to and including a channel’s total announced usable capacity, a value of one will only use up to half its capacity, two 1/4, etc.
Default value: 2
Implementations§
Source§impl RouteParametersConfig
impl RouteParametersConfig
Sourcepub fn with_max_total_routing_fee_msat(self, fee_msat: u64) -> Self
pub fn with_max_total_routing_fee_msat(self, fee_msat: u64) -> Self
Set the maximum total fees, in millisatoshi, that may accrue during route finding.
This is not exported to bindings users since bindings don’t support move semantics
Sourcepub fn with_max_total_cltv_expiry_delta(
self,
max_total_cltv_expiry_delta: u32,
) -> Self
pub fn with_max_total_cltv_expiry_delta( self, max_total_cltv_expiry_delta: u32, ) -> Self
Includes a limit for the total CLTV expiry delta which is considered during routing
This is not exported to bindings users since bindings don’t support move semantics
Sourcepub fn with_max_path_count(self, max_path_count: u8) -> Self
pub fn with_max_path_count(self, max_path_count: u8) -> Self
Includes a limit for the maximum number of payment paths that may be used.
This is not exported to bindings users since bindings don’t support move semantics
Sourcepub fn with_max_channel_saturation_power_of_half(
self,
max_channel_saturation_power_of_half: u8,
) -> Self
pub fn with_max_channel_saturation_power_of_half( self, max_channel_saturation_power_of_half: u8, ) -> Self
Includes a limit for the maximum share of a channel’s total capacity that can be sent over, as
a power of 1/2. See PaymentParameters::max_channel_saturation_power_of_half.
This is not exported to bindings users since bindings don’t support move semantics
Trait Implementations§
Source§impl Clone for RouteParametersConfig
impl Clone for RouteParametersConfig
Source§fn clone(&self) -> RouteParametersConfig
fn clone(&self) -> RouteParametersConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RouteParametersConfig
impl Debug for RouteParametersConfig
Source§impl Default for RouteParametersConfig
impl Default for RouteParametersConfig
Source§impl Readable for RouteParametersConfig
impl Readable for RouteParametersConfig
Source§impl Writeable for RouteParametersConfig
impl Writeable for RouteParametersConfig
impl Copy for RouteParametersConfig
Auto Trait Implementations§
impl Freeze for RouteParametersConfig
impl RefUnwindSafe for RouteParametersConfig
impl Send for RouteParametersConfig
impl Sync for RouteParametersConfig
impl Unpin for RouteParametersConfig
impl UnwindSafe for RouteParametersConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> LengthReadable for Twhere
T: Readable,
impl<T> LengthReadable for Twhere
T: Readable,
Source§fn read_from_fixed_length_buffer<R>(reader: &mut R) -> Result<T, DecodeError>where
R: LengthLimitedRead,
fn read_from_fixed_length_buffer<R>(reader: &mut R) -> Result<T, DecodeError>where
R: LengthLimitedRead,
Self in from the given LengthLimitedRead.