-
Notifications
You must be signed in to change notification settings - Fork 411
Dont use PaymentPathFailed a probe fails without making it out #1704
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
Dont use PaymentPathFailed a probe fails without making it out #1704
Conversation
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.
Argh, good catch!
dd591c2
to
b143b19
Compare
Codecov Report
@@ Coverage Diff @@
## main #1704 +/- ##
==========================================
+ Coverage 90.93% 90.96% +0.02%
==========================================
Files 86 86
Lines 46840 46848 +8
Branches 46840 46848 +8
==========================================
+ Hits 42594 42613 +19
+ Misses 4246 4235 -11
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
`fail_holding_cell_htlcs` calls through to `fail_htlc_backwards_internal` for HTLCs that need to be failed-backwards but opts to generate its own payment failure events for `HTLCSource:;OutboundRoute` HTLCs. There is no reason for that as `fail_htlc_backwards_internal` will also happily generate (now-)equivalent events for `HTLCSource::OutboundRoute` HTLCs. Thus, we can drop the redundant code and always call `fail_htlc_backwards_internal` for each HTLC in `fail_holding_cell_htlcs`.
When we fail to forward a probe HTLC at all and immediately fail it (e.g. due to the first hop channel closing) we'd previously spuriously generate only a `PaymentPathFailed` event. This violates the expected API, as users expect a `ProbeFailed` event instead. This fixes the oversight by ensuring we generate the correct event. Thanks to @jkczyz for pointing out this issue.
Squashed without further changes. |
b143b19
to
6601192
Compare
Based on #1702.
When we fail to forward a probe HTLC at all and immediately fail it
(e.g. due to the first hop channel closing) we'd previously
spuriously generate only a
PaymentPathFailed
event. This violatesthe expected API, as users expect a
ProbeFailed
event instead.This fixes the oversight by ensuring we generate the correct event.
Thanks to @jkczyz for pointing out this issue.