Skip to content
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

refactor: remove ledgercore.OnlineAccountData #5965

Merged

Conversation

algorandskiy
Copy link
Contributor

@algorandskiy algorandskiy commented Mar 20, 2024

Summary

Use basics.OnlineAccountData instead since they are exact duplicates.

Test Plan

Existing tests.

Notes

Merge after #5757 due to conflicts

Copy link

codecov bot commented Mar 20, 2024

Codecov Report

Attention: Patch coverage is 48.14815% with 14 lines in your changes are missing coverage. Please review.

Project coverage is 56.18%. Comparing base (d99c5c3) to head (09e05a5).
Report is 1 commits behind head on master.

Files Patch % Lines
ledger/ledgercore/accountdata.go 14.28% 6 Missing ⚠️
ledger/acctonline.go 60.00% 4 Missing ⚠️
...r/store/trackerdb/generickv/accounts_ext_reader.go 0.00% 2 Missing ⚠️
ledger/store/trackerdb/sqlitedriver/accountsV2.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5965      +/-   ##
==========================================
+ Coverage   55.93%   56.18%   +0.25%     
==========================================
  Files         482      482              
  Lines       67969    67949      -20     
==========================================
+ Hits        38019    38178     +159     
+ Misses      27343    27178     -165     
+ Partials     2607     2593      -14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

jannotti
jannotti previously approved these changes Apr 29, 2024
Copy link
Contributor

@jannotti jannotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is mergable now. Thanks for waiting on the incentives PR.

@algorandskiy algorandskiy merged commit ff2c966 into algorand:master Apr 30, 2024
18 checks passed
type OnlineAccountData struct {
MicroAlgosWithRewards basics.MicroAlgos
VotingData
IncentiveEligible bool
Copy link
Contributor

@cce cce Aug 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're not exact duplicates, I just noticed, because basics.OnlineAccountData has LastHeartbeat/LastProposed, but ledgercore.OnlineAccountData did not have it. So there are some conversion functions that didn't set LastHeartbeat/LastProposed on ledgercore.OnlineAccountData, because it didn't have these fields, but were leaving them empty on conversions from e.g. basics.AccountData => basics.OnlineAccountData because of this change ... addressing this in #6085

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants