-
Notifications
You must be signed in to change notification settings - Fork 1
fix: resolve discrepancy between balance and ln channels view #620
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
Conversation
ovitrif
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.
utAck
LGTM 🙌🏻
Code ReviewTesting inline comment capability... |
Code ReviewI've reviewed this PR and found several issues that need attention: 🚨 Critical Issue: Incorrect Reserve UsedLocation: ChannelDetails.kt:20-22 This change appears to introduce a logic error that contradicts the project's own documentation. According to outboundCapacityMsat / 1000 + counterpartyUnspendablePunishmentReserveThe documentation explicitly warns against using
Why this matters:
This PR does the opposite of what the documentation recommends. Please clarify why this change is correct, or update the documentation if the understanding has changed. CLAUDE.md Violations1. Missing USat Wrapper for Overflow ProtectionLocation: ChannelDetails.kt:22 Issue: ULong arithmetic is performed without CLAUDE.md Rule: Line 207
Current code: return outboundCapacitySat + ourReserveShould be: 2. Commit Message Exceeds Character LimitIssue: The commit message "fix: resolve discrepancy between balance and ln channels view" is 61 characters (exceeds the 50-character limit by 11). CLAUDE.md Rule: Line 165
Suggested alternatives:
3. PR Description Missing Required SectionsIssue: The PR description only contains the issue reference and lacks required template sections. CLAUDE.md Rule: Line 206
Missing sections:
SummaryCritical: 1 logic error (contradicts documentation) Please address the critical issue first, as it may affect the correctness of the balance calculation. |
|
The review point about using USat ( |
Guessing this is not relevant? It would be good to follow up then according to Claude suggestion:
|
We discussed a bit vaguely in this thread. It's definitely worth investigating and adjusting as needed. I auto-merged by mistake tbh 🤦🏻 … well, I agree with the changes, but I also agree with CLAUDE that we need to clarify on these specs. Currently exploring what it would take to expose the |
Fixes (at least the balance discrepancy part of) #615