-
Notifications
You must be signed in to change notification settings - Fork 519
ledger: fix duplicate empty rows for suspended accounts #6314
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
ledger: fix duplicate empty rows for suspended accounts #6314
Conversation
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.
Pull Request Overview
This PR fixes an issue with duplicate empty rows being created for suspended accounts in the online accounts table. Main changes include adding a new test (TestOnlineAccountsSuspended) to verify the fix and updating the condition in onlineAccountsNewRoundImpl to prevent extra insertions for suspended accounts.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| ledger/acctdeltas_test.go | Adds a new test to check that suspended accounts do not get extra rows |
| ledger/acctdeltas.go | Updates conditional logic to use newStatus instead of empty voting data check |
cce
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.
follow-up to #6295
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6314 +/- ##
==========================================
- Coverage 51.60% 51.59% -0.01%
==========================================
Files 649 649
Lines 87048 87048
==========================================
- Hits 44917 44911 -6
- Misses 39269 39270 +1
- Partials 2862 2867 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
There is a discrepancy on how ledger stores base accounts and derived online accounts history.
In case of suspended account there is a "new" combination of status=offline and non-empty voting data that caused extra rows creation in online accounts table.
Test Plan
Added a unit test