-
Notifications
You must be signed in to change notification settings - Fork 367
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
Add missing break when scoring a path with a missing channel #1817
Add missing break when scoring a path with a missing channel #1817
Conversation
Needs a test, probably, but I'm not gonna do that right now. |
Codecov ReportBase: 90.77% // Head: 91.30% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1817 +/- ##
==========================================
+ Coverage 90.77% 91.30% +0.52%
==========================================
Files 87 87
Lines 47371 49634 +2263
Branches 47371 49634 +2263
==========================================
+ Hits 43003 45317 +2314
+ Misses 4368 4317 -51
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
Makes sense. Just want to note that we'd probably want to solve this differently if we'd ever have to deal with paths in which the unannounced channels are located somewhere other than the beginning or end. I imagine this could be the case for trampoline nodes, but scoring for that probably requires rethinking a lot of things anyways.
Not sure why benchmark CI is failing, couldn't reproduce locally.
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.
Needs a test, probably, but I'm not gonna do that right now.
Yeah, test is definitely needed here.
I'm not sure why that's the case? We don't want to break until we find the channel that caused the failure, if there's some channels in the middle that don't have a graph entry we should just ignore them. I believe that's what this change does. |
I was under the impression that we'd |
8dd3b30
to
64dc637
Compare
If we send payments over a path where a channel ended up being closed, we'll remove it before we call `ProbabilisticPaymentScorer::payment_path_failed`. This should be fine, except that `payment_path_failed` does not break out of its scoring loop if a channel is missing, causing it to assign a minimum available-liquidity of the payment amount even to channels which our attempt never arrived at. The fix is simple - add the missing check and break.
64dc637
to
00607a5
Compare
Squashed without further changes. |
If we send payments over a path where a channel ended up being closed, we'll remove it before we call
ProbabilisticPaymentScorer::payment_path_failed
. This should be fine, except thatpayment_path_failed
does not break out of its scoring loop if a channel is missing, causing it to assign a minimum available-liquidity of the payment amount even to channels which our attempt never arrived at.The fix is simple - add the missing check and break.