@@ -279,11 +279,14 @@ impl_writeable_tlv_based!(BlindedTail, {
279
279
( 8 , intro_node_scid, required) ,
280
280
} ) ;
281
281
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.
283
285
#[ derive( Clone , Debug , Hash , PartialEq , Eq ) ]
284
286
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.
287
290
pub hops : Vec < RouteHop > ,
288
291
/// The blinded path at which this path terminates, if we're sending to one, and its metadata.
289
292
pub blinded_tail : Option < BlindedTail > ,
@@ -293,11 +296,7 @@ pub struct Path {
293
296
/// it can take multiple paths. Each path is composed of one or more hops through the network.
294
297
#[ derive( Clone , Hash , PartialEq , Eq ) ]
295
298
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
301
300
/// [`BlindedTail`]s are present, then the pubkey of the last [`RouteHop`] in each path must be
302
301
/// the same.
303
302
pub paths : Vec < Path > ,
0 commit comments