-
Notifications
You must be signed in to change notification settings - Fork 411
Fix update_id
gap during force_shutdown
#3858
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?
Conversation
👋 I see @jkczyz was un-assigned. |
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.
Thanks! This should work, but do you mind including a test?
There are other scenarios where we also increment by 1, but those should not result in a panic as they are queued in blocked_monitor_updates
. The force close update is the only one we let fly through regardless of blocked_monitor_updates
.
When a channel is force-closed, there might be blocked monitor updates not yet applied. But `latest_monitor_update_id` has been incremented and assigned to these updates. This results in a panic when trying to apply the `ChannelForceClosed` update. Use the unblocked update id instead. Resolves: lightningdevkit#3857
446155b
to
5e6e74c
Compare
Got it! Will add a test later. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3858 +/- ##
==========================================
- Coverage 89.94% 89.91% -0.04%
==========================================
Files 163 163
Lines 131655 131652 -3
Branches 131655 131652 -3
==========================================
- Hits 118421 118371 -50
- Misses 10550 10583 +33
- Partials 2684 2698 +14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Thanks. I think there's a few more changes I want to make to this pipeline but this change by itself looks good.
When a channel is force-closed, there might be blocked monitor updates not yet applied. But
latest_monitor_update_id
has been incremented and assigned to these updates. This results in a panic when trying to apply theChannelForceClosed
update. Use the unblocked update id instead.Resolves: #3857