Skip to content

Conversation

@algorandskiy
Copy link
Contributor

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

@algorandskiy algorandskiy self-assigned this May 5, 2025
@algorandskiy algorandskiy requested a review from cce May 5, 2025 20:05
@cce cce requested a review from Copilot May 5, 2025 20:07
Copy link
Contributor

Copilot AI left a 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
cce previously approved these changes May 5, 2025
Copy link
Contributor

@cce cce left a 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
Copy link

codecov bot commented May 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.59%. Comparing base (c95bb50) to head (d60a5c3).
Report is 2 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@algorandskiy algorandskiy merged commit 5d1d36e into algorand:master May 6, 2025
19 checks passed
cce pushed a commit to cce/go-algorand that referenced this pull request May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants