pub struct RouteParameters {
pub payment_params: PaymentParameters,
pub final_value_msat: u64,
pub max_total_routing_fee_msat: Option<u64>,
}Expand description
Parameters needed to find a Route.
Passed to find_route and build_route_from_hops.
Fields§
§payment_params: PaymentParametersThe parameters of the failed payment path.
final_value_msat: u64The amount in msats sent on the failed payment path.
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.
Implementations§
Source§impl RouteParameters
impl RouteParameters
Sourcepub fn from_payment_params_and_value(
payment_params: PaymentParameters,
final_value_msat: u64,
) -> Self
pub fn from_payment_params_and_value( payment_params: PaymentParameters, final_value_msat: u64, ) -> Self
Constructs RouteParameters from the given PaymentParameters and a payment amount.
Self::max_total_routing_fee_msat defaults to 1% of the payment amount + 50 sats
Sourcepub fn set_max_path_length(
&mut self,
recipient_onion: &RecipientOnionFields,
is_keysend: bool,
best_block_height: u32,
) -> Result<(), ()>
pub fn set_max_path_length( &mut self, recipient_onion: &RecipientOnionFields, is_keysend: bool, best_block_height: u32, ) -> Result<(), ()>
Sets the maximum number of hops that can be included in a payment path, based on the provided
RecipientOnionFields and blinded paths.
Trait Implementations§
Source§impl Clone for RouteParameters
impl Clone for RouteParameters
Source§fn clone(&self) -> RouteParameters
fn clone(&self) -> RouteParameters
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RouteParameters
impl Debug for RouteParameters
Source§impl Hash for RouteParameters
impl Hash for RouteParameters
Source§impl PartialEq for RouteParameters
impl PartialEq for RouteParameters
Source§impl Readable for RouteParameters
impl Readable for RouteParameters
Source§impl Writeable for RouteParameters
impl Writeable for RouteParameters
impl Eq for RouteParameters
impl StructuralPartialEq for RouteParameters
Auto Trait Implementations§
impl Freeze for RouteParameters
impl RefUnwindSafe for RouteParameters
impl Send for RouteParameters
impl Sync for RouteParameters
impl Unpin for RouteParameters
impl UnwindSafe for RouteParameters
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
Mutably borrows from an owned value. Read more