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

rpcserver: Decouple RPC agenda info status strings. #3071

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Mar 2, 2023

Similar to the case that previously existed for getblockchainfo, currently, the getvoteinfo RPC implementation directly returns the internal threshold state strings defined in blockchain. This is not ideal since it means that any changes to the internal implementation could inadvertently change the RPC results without being noticed.

Further, the blockchain package is now internal which means external callers don't have access to those constants.

Consequently, this makes the same change to getvoteinfo as was previously made to getblockchaininfo to decouple the agenda status strings by converting the internal blockchain threshold state to use the agenda status string constants defined in the rpc/jsonrpc/types module.

@davecgh davecgh added this to the 1.8.0 milestone Mar 2, 2023
Similar to the case that previously existed for getblockchainfo,
currently, the getvoteinfo RPC implementation directly returns the
internal threshold state strings defined in blockchain.  This is not
ideal since it means that any changes to the internal implementation
could inadvertently change the RPC results without being noticed.

Further, the blockchain package is now internal which means external
callers don't have access to those constants.

Consequently, this makes the same change to getvoteinfo as was
previously made to getblockchaininfo to decouple the agenda status
strings by converting the internal blockchain threshold state to use the
agenda status string constants defined in the rpc/jsonrpc/types module.
@davecgh davecgh force-pushed the rpcserver_decouple_rpcserver_getvoteinfo_agendastatus branch from e75364d to 83b7f16 Compare March 5, 2023 03:33
@davecgh davecgh merged commit 83b7f16 into decred:master Mar 5, 2023
@davecgh davecgh deleted the rpcserver_decouple_rpcserver_getvoteinfo_agendastatus branch March 5, 2023 03:41
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.

2 participants