@@ -226,8 +226,7 @@ pub struct RouteHop {
226
226
/// to reach this node.
227
227
pub channel_features : ChannelFeatures ,
228
228
/// The fee taken on this hop (for paying for the use of the *next* channel in the path).
229
- /// For the last hop, this should be the full value of the payment (might be more than
230
- /// requested if we had to match htlc_minimum_msat).
229
+ /// For the last hop, this should be the full value of this path's part of the payment.
231
230
pub fee_msat : u64 ,
232
231
/// The CLTV delta added for this hop. For the last hop, this should be the full CLTV value
233
232
/// expected at the destination, in excess of the current block height.
@@ -247,8 +246,8 @@ impl_writeable_tlv_based!(RouteHop, {
247
246
/// it can take multiple paths. Each path is composed of one or more hops through the network.
248
247
#[ derive( Clone , Hash , PartialEq , Eq ) ]
249
248
pub struct Route {
250
- /// The list of routes taken for a single (potentially-)multi-part payment. The pubkey of the
251
- /// last RouteHop in each path must be the same. Each entry represents a list of hops, NOT
249
+ /// The list of paths taken for a single (potentially-)multi-part payment. The pubkey of the
250
+ /// last [` RouteHop`] in each path must be the same. Each entry represents a list of hops, NOT
252
251
/// INCLUDING our own, where the last hop is the destination. Thus, this must always be at
253
252
/// least length one. While the maximum length of any given path is variable, keeping the length
254
253
/// of any path less or equal to 19 should currently ensure it is viable.
@@ -283,7 +282,8 @@ impl Route {
283
282
self . paths . iter ( ) . map ( |path| path. get_path_fees ( ) ) . sum ( )
284
283
}
285
284
286
- /// Returns the total amount paid on this [`Route`], excluding the fees.
285
+ /// Returns the total amount paid on this [`Route`], excluding the fees. Might be more than
286
+ /// requested if we had to reach htlc_minimum_msat.
287
287
pub fn get_total_amount ( & self ) -> u64 {
288
288
return self . paths . iter ( )
289
289
. map ( |path| path. split_last ( ) . map ( |( hop, _) | hop. fee_msat ) . unwrap_or ( 0 ) )
0 commit comments