-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Improve lncli closechannel error messages for mempool fee and channel state (#9155) #10288
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: master
Are you sure you want to change the base?
Conversation
… state - Enhance user-facing error when mempool fee is too low, suggesting bumpfee usage. - Add clear error when channel is already closing, guiding users to pendingchannels and bumpfee.
Summary of ChangesHello @Suvrat1629, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the user experience for Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request improves error messages in lncli closechannel
to be more actionable. The changes are good, but I have a couple of suggestions. In lnwallet/btcwallet/btcwallet.go
, the new error message is too specific and assumes a cooperative close, which might not always be the case. I've suggested a more generic message. In rpcserver.go
, there are some indentation issues and long error strings that could be improved for readability, following the repository's style guide.
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.
I was able to reproduce this part (unable to gracefully close channel...
), so I think the fix makes sense. However, I think the error wording could be improved.
I was at least able to test this behaviour through itest modification (see lnd_coop_close_*
). I would expect it would be good (not sure if it would be overkill) if you could also add a minimal itest for this.
Also, I have some thoughts on ErrMempoolFee
, so I left my comment here: #9155 (comment)
Any suggestions on how to improve this? I tried to keep the message as direct as possible based on my understanding.
I will add a test once you approve my changes. I think I need to add tests in
Yes I did take a look at the comment and I am still learning about the codebase so I took a look at lnd/lnwallet/interface.go I think this is the base error and handles generic error messages, my change in the this pr handles the specific case mentioned in the issue. |
Change Description
This PR addresses issue #9155 by making error messages for lncli closechannel more actionable and less confusing:
All error strings follow Go style guidelines.
Steps to Test
Pull Request Checklist
Testing
Code Style and Documentation
[skip ci]
in the commit message for small changes.📝 Please see our Contribution Guidelines for further guidance.