pub struct Route {
pub paths: Vec<Path>,
pub route_params: Option<RouteParameters>,
}
Expand description
A route directs a payment from the sender (us) to the recipient. If the recipient supports MPP, it can take multiple paths. Each path is composed of one or more hops through the network.
Fields§
§paths: Vec<Path>
The list of Path
s taken for a single (potentially-)multi-part payment. If no
BlindedTail
s are present, then the pubkey of the last RouteHop
in each path must be
the same.
route_params: Option<RouteParameters>
The route_params
parameter passed to find_route
.
This is used by ChannelManager
to track information which may be required for retries.
Will be None
for objects serialized with LDK versions prior to 0.0.117.
Implementations§
source§impl Route
impl Route
sourcepub fn get_total_fees(&self) -> u64
pub fn get_total_fees(&self) -> u64
Returns the total amount of fees paid on this Route
.
For objects serialized with LDK 0.0.117 and after, this includes any extra payment made to
the recipient, which can happen in excess of the amount passed to find_route
via
RouteParameters::final_value_msat
, if we had to reach the htlc_minimum_msat
limits.
sourcepub fn get_total_amount(&self) -> u64
pub fn get_total_amount(&self) -> u64
Returns the total amount paid on this Route
, excluding the fees.
Might be more than requested as part of the given RouteParameters::final_value_msat
if
we had to reach the htlc_minimum_msat
limits.