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

feat: add delegate.voters attribute #69

Merged
merged 1 commit into from Apr 25, 2022
Merged

feat: add delegate.voters attribute #69

merged 1 commit into from Apr 25, 2022

Conversation

alessiodf
Copy link
Collaborator

Core's Public API lacks an easy way to see how many wallets are voting for each delegate without querying each delegate's endpoint individually. This PR improves on this by adding a delegate.voters attribute to all delegates, with the total number of wallets voting for that delegate. This information is now exposed via /api/delegates and /api/delegates/{id}.

This brings the same functionality as the @dpos-info/core-voter-count plugin but natively in Core and we would like to recognise, acknowledge and thank them their reference implementation. Implementing it natively in Core also means new search and sorting criteria has been added to the /api/delegates API endpoint for the voters attribute and it will continue to work correctly with several upcoming changes to Solar which would otherwise break the plugin.

@Cactus-15-49 Cactus-15-49 merged commit fc745fc into develop Apr 25, 2022
@Cactus-15-49 Cactus-15-49 deleted the feat/voters branch April 25, 2022 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants