-
Notifications
You must be signed in to change notification settings - Fork 441
Clarify find_route Documentation #4421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2476,6 +2476,25 @@ fn sort_first_hop_channels( | |||||
| /// However, the enabled/disabled bit on such channels as well as the `htlc_minimum_msat` / | ||||||
| /// `htlc_maximum_msat` *are* checked as they may change based on the receiving node. | ||||||
| /// | ||||||
| /// Routes are constructed by searching the provided [`NetworkGraph`] for paths from the payer | ||||||
| /// to the payee that satisfy the constraints in [`RouteParameters`]. Fees are accumulated | ||||||
| /// backwards from the payee to the payer, and CLTV expiry deltas are aggregated hop-by-hop. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "accumulated backwards" doesn't really tell me what this means or why its important if I don't know LN super well. Maybe its worth just leaving out or tweaking, though I'm not quite sure how to do so, maybe something like this?
Suggested change
|
||||||
| /// | ||||||
| /// Channel selection and path ranking are influenced by the provided [`ScoreLookUp`] | ||||||
| /// implementation, which may apply penalties based on historical reliability, | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mention how the penalties are included. |
||||||
| /// liquidity hints, or in-flight HTLCs. | ||||||
| /// | ||||||
| /// If `first_hops` is provided, those channels are used as the only outbound candidates | ||||||
| /// from the payer, overriding the corresponding entries in the [`NetworkGraph`]. | ||||||
| /// | ||||||
| /// # Errors | ||||||
| /// | ||||||
| /// Returns an error if: | ||||||
| /// - The payer and payee are the same node. | ||||||
| /// - The payment amount is zero or exceeds the maximum representable value. | ||||||
| /// - The total CLTV expiry constraint cannot accommodate the payee's required final CLTV delta. | ||||||
| /// - No route satisfying liquidity, feature, and policy constraints can be found. | ||||||
| /// | ||||||
| /// # Panics | ||||||
| /// | ||||||
| /// Panics if first_hops contains channels without `short_channel_id`s; | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reads as a second introductory sentence, maybe it should simply replace the first sentence instead?