-
Notifications
You must be signed in to change notification settings - Fork 2.2k
peer: fix MarkCoopBroadcasted to correctly use local parameter #10532
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
peer: fix MarkCoopBroadcasted to correctly use local parameter #10532
Conversation
Summary of ChangesHello @darioAnongba, 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 resolves a critical bug in the channel observer's cooperative close broadcast marking mechanism. The issue stemmed from an incorrect handling of the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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 addresses a bug in chanObserver.MarkCoopBroadcasted where the local parameter was disregarded, leading to incorrect channel status updates. The fix correctly translates the boolean local parameter into the appropriate lntypes.ChannelParty, ensuring the correct initiator of a cooperative close is recorded. The change is clear, correct, and well-contained. Excellent work.
🔴 PR Severity: CRITICAL
🔴 Critical (1 file)
AnalysisThis PR is classified as CRITICAL because it modifies code in the The specific bug being fixed is in While this is a small, surgical fix (7 lines changed), it affects channel state persistence during cooperative closes, which is a critical operation. The bug could lead to incorrect accounting of who initiated channel closes, potentially affecting analytics, dispute tracking, or other downstream systems that rely on accurate close initiator information. The fix properly converts the boolean parameter to the appropriate Recommendation: This requires expert review to ensure the fix correctly handles both local and remote close initiator cases and that the persisted state is now accurate. To override, add a |
ziggie1984
left a comment
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.
Looks good, pending release-note entry
1fcf2ff to
6e56c9a
Compare
|
Release note added. |
🔴 PR Severity: CRITICAL
🔴 Critical (1 file)
🟢 Low (1 file)
AnalysisThis PR fixes a bug in the cooperative channel close flow where the Why CRITICAL:
Review considerations:
To override, add a |
hieblmi
left a comment
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.
LGTM!
This commit fixes a bug in
chanObserver.MarkCoopBroadcastedwhere the local parameter was being ignored. The function always passedlntypes.Localto the underlyingMarkCoopBroadcastedcall, regardless of which party actually initiated the cooperative close.This caused the channel status to incorrectly include
ChanStatusLocalCloseInitiatoreven on the remote node, resulting in incorrectclose_initiatorvalues in RPC responses.The fix converts the local bool parameter to the appropriate
lntypes.ChannelPartybefore passing it through.