-
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
Force enqueue second forward event for phantom receives #2395
Force enqueue second forward event for phantom receives #2395
Conversation
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #2395 +/- ##
==========================================
- Coverage 90.32% 90.32% -0.01%
==========================================
Files 106 106
Lines 54968 54979 +11
Branches 54968 54979 +11
==========================================
+ Hits 49651 49659 +8
- Misses 5317 5320 +3
☔ View full report in Codecov by Sentry. |
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, interesting, good catch!
4cb4918
to
313af81
Compare
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
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 outside the remaining comments
313af81
to
89cf906
Compare
This was a regression resulting from f2453b7 since we now process events in a loop until there aren't any left. Processing events is done in batches and they are not removed until we're done processing each batch. Since handling a `PendingHTLCsForwardable` event will call back into the `ChannelManager`, we'll still see the original forwarding event not removed. Phantom payments will need an additional forwarding event before being claimed to make them look real by taking more time.
89cf906
to
81722ca
Compare
This was a regression resulting from f2453b7 since we now process events in a loop until there aren't any left. Phantom receives rely on two calls to
ChannelManager::process_pending_htlc_forwards
before emiting thePaymentClaimable
event, providing better privacy to make them look "real" by taking more time.Fixes #2378.