Skip to content
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

Finish closing channel after async closing signed #3296

Conversation

alecchendev
Copy link
Contributor

Addressing follow up in #3153 (comment).

In addressing a followup to test reconnection during closing negotation with async signing, we change things to only return a ShutdownResult when we actually finish shutting down the channel, i.e. we have the signature ready to send the final closing signed. This slightly simplifies the logic where we would shutdown our channel prematurely before we got the final signature. This also means that we don't push multiple ChannelClosed events if we receive closing signed, reconnect, and receive closing signed again.

Copy link

codecov bot commented Sep 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.60%. Comparing base (d35239c) to head (1fa7bf9).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3296      +/-   ##
==========================================
- Coverage   89.85%   89.60%   -0.25%     
==========================================
  Files         126      126              
  Lines      104145   102170    -1975     
  Branches   104145   102170    -1975     
==========================================
- Hits        93577    91549    -2028     
+ Misses       7894     7890       -4     
- Partials     2674     2731      +57     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

lightning/src/ln/async_signer_tests.rs Show resolved Hide resolved
In addressing a followup to test reconnection during closing negotation
with async signing, we change things to only return a `ShutdownResult`
when we actually finish shutting down the channel, i.e. we have the
signature ready to send the final closing signed. This slightly
simplifies the logic where we would shutdown our channel
prematurely before we got the final signature. This also means
that we don't push multiple `ChannelClosed` events if we receive closing
signed, reconnect, and receive closing signed again.
@alecchendev alecchendev force-pushed the 2024-09-async-close-sign-followup branch from 7c77fcf to 1fa7bf9 Compare September 9, 2024 16:47
@TheBlueMatt TheBlueMatt merged commit d65dc9c into lightningdevkit:main Sep 9, 2024
16 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants