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

Expose whether a channel is closing in ChannelDetails #2347

Merged
merged 1 commit into from Jul 7, 2023

Conversation

henghonglee
Copy link
Contributor

@henghonglee henghonglee commented Jun 9, 2023

fixes #2304

Add is_channel_shutting_down to ChannelDetails

@henghonglee henghonglee marked this pull request as ready for review June 9, 2023 05:11
@codecov-commenter
Copy link

codecov-commenter commented Jun 9, 2023

Codecov Report

Patch coverage: 93.80% and no project coverage change.

Comparison is base (86fd9e7) 90.32% compared to head (4a25aab) 90.33%.

❗ Current head 4a25aab differs from pull request most recent head 47cb45e. Consider uploading reports for the commit 47cb45e to get more accurate results

❗ 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    #2347    +/-   ##
========================================
  Coverage   90.32%   90.33%            
========================================
  Files         106      106            
  Lines       54968    55072   +104     
  Branches    54968    55072   +104     
========================================
+ Hits        49651    49750    +99     
- Misses       5317     5322     +5     
Impacted Files Coverage Δ
lightning/src/routing/router.rs 93.65% <ø> (+0.10%) ⬆️
lightning/src/ln/channelmanager.rs 86.17% <37.50%> (-0.10%) ⬇️
lightning/src/ln/channel.rs 89.39% <83.33%> (-0.03%) ⬇️
lightning/src/ln/functional_test_utils.rs 88.21% <100.00%> (+0.37%) ⬆️
lightning/src/ln/shutdown_tests.rs 98.40% <100.00%> (+0.22%) ⬆️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

lightning/src/ln/channel.rs Outdated Show resolved Hide resolved
@TheBlueMatt
Copy link
Collaborator

Would be nice for this to be an enum that also indicates what state we're in in the shutdown process, basically htlcsremain (ie pre-closing_signed waiting on some HTLCs to resolve) or closing-fee-negotiation.

@henghonglee
Copy link
Contributor Author

thanks for the comments! ill make the necessary changes and tests!

@dunxen
Copy link
Contributor

dunxen commented Jun 26, 2023

Oops, did you mean to close this, @henghonglee? :)

@henghonglee
Copy link
Contributor Author

oops, no sorry im working on another implementation, accidently pushed empty commit. will push a new one today

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.

Basically LGTM, one comment.

lightning/src/ln/channel.rs Outdated Show resolved Hide resolved
@TheBlueMatt
Copy link
Collaborator

IMO we should just merge this if its ready for 116, there's little diff and its a nice simple extra feature.

Copy link
Contributor

@dunxen dunxen left a comment

Choose a reason for hiding this comment

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

Just nits, but LGTM

lightning/src/ln/channelmanager.rs Outdated Show resolved Hide resolved
lightning/src/ln/channelmanager.rs Outdated Show resolved Hide resolved
lightning/src/ln/channelmanager.rs Outdated Show resolved Hide resolved
lightning/src/ln/channelmanager.rs Outdated Show resolved Hide resolved
@henghonglee
Copy link
Contributor Author

@TheBlueMatt let me work on a quick fix of all the comments rn. should be done in abit

@henghonglee
Copy link
Contributor Author

hmmm i'm having a problem with the impl_writeable_tlv_based_enum macro. it causes a CI issue with addr2line

@henghonglee henghonglee force-pushed the issue-2304 branch 2 times, most recently from 9eb4b78 to 78e1c39 Compare July 3, 2023 00:14
@henghonglee
Copy link
Contributor Author

test failures related to #2385

@henghonglee henghonglee requested a review from dunxen July 3, 2023 03:51
dunxen
dunxen previously approved these changes Jul 3, 2023
lightning/src/ln/channelmanager.rs Outdated Show resolved Hide resolved
lightning/src/ln/channelmanager.rs Outdated Show resolved Hide resolved
lightning/src/ln/channelmanager.rs Outdated Show resolved Hide resolved
lightning/src/ln/channelmanager.rs Outdated Show resolved Hide resolved
lightning/src/ln/channelmanager.rs Outdated Show resolved Hide resolved
lightning/src/ln/channelmanager.rs Outdated Show resolved Hide resolved
lightning/src/ln/channel.rs Outdated Show resolved Hide resolved
lightning/src/ln/channelmanager.rs Outdated Show resolved Hide resolved
lightning/src/ln/channelmanager.rs Outdated Show resolved Hide resolved
lightning/src/ln/channelmanager.rs Outdated Show resolved Hide resolved
lightning/src/ln/channelmanager.rs Outdated Show resolved Hide resolved
lightning/src/ln/channelmanager.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@dunxen dunxen left a comment

Choose a reason for hiding this comment

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

LGTM

lightning/src/ln/shutdown_tests.rs Outdated Show resolved Hide resolved
lightning/src/ln/channelmanager.rs Outdated Show resolved Hide resolved
lightning/src/ln/channelmanager.rs Outdated Show resolved Hide resolved
lightning/src/ln/channelmanager.rs Outdated Show resolved Hide resolved
lightning/src/ln/channelmanager.rs Outdated Show resolved Hide resolved
This commit adds the state of channel shutdown to channeldetails
@henghonglee
Copy link
Contributor Author

Addressed comments

@TheBlueMatt TheBlueMatt merged commit 3236be1 into lightningdevkit:main Jul 7, 2023
14 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.

Expose whether a channel is closing in ChannelDetails
5 participants