Skip to content

Commit d6ca84b

Browse files
Minor Route/RouteHop doc updates
1 parent 2e82123 commit d6ca84b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lightning/src/routing/router.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,7 @@ pub struct RouteHop {
226226
/// to reach this node.
227227
pub channel_features: ChannelFeatures,
228228
/// 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.
231230
pub fee_msat: u64,
232231
/// The CLTV delta added for this hop. For the last hop, this should be the full CLTV value
233232
/// expected at the destination, in excess of the current block height.
@@ -247,8 +246,8 @@ impl_writeable_tlv_based!(RouteHop, {
247246
/// it can take multiple paths. Each path is composed of one or more hops through the network.
248247
#[derive(Clone, Hash, PartialEq, Eq)]
249248
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
252251
/// INCLUDING our own, where the last hop is the destination. Thus, this must always be at
253252
/// least length one. While the maximum length of any given path is variable, keeping the length
254253
/// of any path less or equal to 19 should currently ensure it is viable.
@@ -283,7 +282,8 @@ impl Route {
283282
self.paths.iter().map(|path| path.get_path_fees()).sum()
284283
}
285284

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.
287287
pub fn get_total_amount(&self) -> u64 {
288288
return self.paths.iter()
289289
.map(|path| path.split_last().map(|(hop, _)| hop.fee_msat).unwrap_or(0))

0 commit comments

Comments
 (0)