-
Notifications
You must be signed in to change notification settings - Fork 384
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
Split commitment_signed
handling by check-accept
#3633
base: main
Are you sure you want to change the base?
Split commitment_signed
handling by check-accept
#3633
Conversation
d8bdc8f
to
3a52856
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.
This was much simpler than we expected :)
9c29928
to
5d9e8f1
Compare
Latest pushes were just to address |
5d9e8f1
to
08cef17
Compare
Yeah, luckily compiling after removing the |
08cef17
to
baa9e76
Compare
Feel free to squash |
When handling commitment_signed messages, a number of checks are performed before a ChannelMonitorUpdate is created and returned. Once splicing is added, these checks need to be performed on the primary FundingScope and any pending scopes that resulted from splicing or RBF. This commit splits the handling into a check and accept methods, taking &self and &mut self, respectively. This ensures that the ChannelContext is not modified between checks. Once all funding scopes have been checked successfully, the accept portion of the code can then execute.
Now that commitment_signed is split into check and accept methods, move the check portion from FundedChannel to ChannelContext. This allows calling it with a different FundingScope when there are pending splices and RBF attempts.
baa9e76
to
119b64a
Compare
Squashed |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3633 +/- ##
==========================================
- Coverage 89.19% 89.19% -0.01%
==========================================
Files 152 152
Lines 118681 118696 +15
Branches 118681 118696 +15
==========================================
+ Hits 105860 105869 +9
- Misses 10236 10242 +6
Partials 2585 2585 ☔ View full report in Codecov by Sentry. |
When handling
commitment_signed messages
, a number of checks are performed before aChannelMonitorUpdate
is created and returned. Once splicing is added, these checks need to be performed on the primaryFundingScope
and any pending scopes that resulted from splicing or RBF.This PR splits the handling into a check and accept methods, taking
&self
and&mut self
, respectively. This ensures that theChannelContext
is not modified between checks. Once all funding scopes have been checked successfully, the accept portion of the code can then execute.