-
Notifications
You must be signed in to change notification settings - Fork 385
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
Consider maximum path length during path finding. #1476
Consider maximum path length during path finding. #1476
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1476 +/- ##
==========================================
+ Coverage 90.89% 91.03% +0.14%
==========================================
Files 76 77 +1
Lines 42075 43973 +1898
Branches 42075 43973 +1898
==========================================
+ Hits 38244 40032 +1788
- Misses 3831 3941 +110
Continue to review full report at Codecov.
|
ef962dc
to
190bca7
Compare
Squashed and added a minor refactoring commit, because I found spelling out these types could improve readability. |
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.
LGTM, aside form some formatting nits.
462c1e9
to
6de687c
Compare
Rebased and squashed. |
18d2671
to
e5d06b4
Compare
Kicked CI... |
70899b6
to
178827f
Compare
Squashed & rebased. |
LGTM, didn't review the math too closely but its close enough, lets set the max to 19. |
3f15720
to
6330487
Compare
Squashed once more. |
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.
Minor questions, otherwise ACK
2f0ab89
to
966c99d
Compare
966c99d
to
87c9684
Compare
@@ -177,9 +176,23 @@ impl_writeable_tlv_based!(RouteParameters, { | |||
/// Maximum total CTLV difference we allow for a full payment path. | |||
pub const DEFAULT_MAX_TOTAL_CLTV_EXPIRY_DELTA: u32 = 1008; | |||
|
|||
/// The median hop CLTV expiry delta currently seen in the network. | |||
// The median hop CLTV expiry delta currently seen in the network. |
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.
nit, though its not worth changing back - we can leave doc comments on private items just fine, cargo doc
has a --document-private-...
flag to generate the docs for them, even. That said, it doesn't matter much we don't really use private docs AFAIK, but some devs may in the future.
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.
Ah, fair enough, just thought I'd keep it consistent with visibility.
With this PR, we only consider returning paths from
get_route
which are shorter than our maximum path length estimate.Rationale as given in the comment:
Fixes #1371.