Skip to content

Commit 19f3830

Browse files
f tweak Route/Path docs
1 parent 68352a4 commit 19f3830

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

lightning/src/routing/router.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -279,11 +279,14 @@ impl_writeable_tlv_based!(BlindedTail, {
279279
(8, intro_node_scid, required),
280280
});
281281

282-
/// A path in a [`Route`] to the payment recipient.
282+
/// A path in a [`Route`] to the payment recipient. Must always be at least length one. While the
283+
/// maximum length of any given path is variable, keeping the length of any path less than or equal
284+
/// to 19 should currently ensure it is viable.
283285
#[derive(Clone, Debug, Hash, PartialEq, Eq)]
284286
pub struct Path {
285-
/// The list of unblinded hops in this [`Path`]. May be empty if a blinded path is present,
286-
/// otherwise the last hop is the destination and this must be at least length one.
287+
/// The list of unblinded hops in this [`Path`], NOT INCLUDING our own. May be empty if a blinded
288+
/// path is present, otherwise the last hop is the destination and this must be at least length
289+
/// one.
287290
pub hops: Vec<RouteHop>,
288291
/// The blinded path at which this path terminates, if we're sending to one, and its metadata.
289292
pub blinded_tail: Option<BlindedTail>,
@@ -293,11 +296,7 @@ pub struct Path {
293296
/// it can take multiple paths. Each path is composed of one or more hops through the network.
294297
#[derive(Clone, Hash, PartialEq, Eq)]
295298
pub struct Route {
296-
/// The list of [`Path`]s taken for a single (potentially-)multi-part payment. Each entry
297-
/// represents a list of hops, NOT INCLUDING our own, where the last hop is either the recipient
298-
/// or a [`BlindedTail`] that hides the recipient's identity. Thus, [`Path::len`] must always be
299-
/// at least length one. While the maximum length of any given path is variable, keeping the
300-
/// length of any path less than or equal to 19 should currently ensure it is viable. If no
299+
/// The list of [`Path`]s taken for a single (potentially-)multi-part payment. If no
301300
/// [`BlindedTail`]s are present, then the pubkey of the last [`RouteHop`] in each path must be
302301
/// the same.
303302
pub paths: Vec<Path>,

0 commit comments

Comments
 (0)