Skip to content

API: add OnlineCirculation to GetSupply #6322

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cce
Copy link
Contributor

@cce cce commented May 12, 2025

Summary

The online circulation used by agreement (which excludes online accounts that have expired, but haven't been marked offline) is implemented in Ledger.OnlineCirculation but not exposed to the REST API. This adds it to GetSupply and SupplyResponse.

Test Plan

Updated TestGetSupply

@cce cce marked this pull request as ready for review May 13, 2025 02:05
Copy link

codecov bot commented May 13, 2025

Codecov Report

Attention: Patch coverage is 57.89474% with 16 lines in your changes missing coverage. Please review.

Project coverage is 51.86%. Comparing base (005bf7e) to head (cdec276).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
daemon/algod/api/server/v2/handlers.go 0.00% 14 Missing ⚠️
daemon/algod/api/server/v2/test/helpers.go 91.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6322   +/-   ##
=======================================
  Coverage   51.85%   51.86%           
=======================================
  Files         652      652           
  Lines       87433    87462   +29     
=======================================
+ Hits        45340    45358   +18     
- Misses      39226    39239   +13     
+ Partials     2867     2865    -2     

☔ 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.

@@ -5544,6 +5545,10 @@
"description": "OnlineMoney",
"type": "integer"
},
"online-circulation": {
"description": "OnlineCirculation as used by consensus, excluding expired accounts",
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe add some clarification about the value: like not a value at the moment but at -320 rounds back as consensus defines? Or it is too much?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh that is a good point, I could add something about how this is the balance at current-320 used to vote on the current-round field

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.

2 participants