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

Simplify staking reward query #399

Closed
ethanfrey opened this issue Jan 29, 2021 · 1 comment
Closed

Simplify staking reward query #399

ethanfrey opened this issue Jan 29, 2021 · 1 comment
Milestone

Comments

@ethanfrey
Copy link
Member

ethanfrey commented Jan 29, 2021

See https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/keeper/query_plugins.go#L269-L292

cosmos/cosmos-sdk#7466 was never closed but the relevant code was made public in stargate, so we can now use these lower level calls, rather than going through the public query interface.

@ethanfrey ethanfrey added this to the v0.16.0 milestone Jan 29, 2021
@ethanfrey
Copy link
Member Author

Trying to resolve this, I found that it is much harder to use the lower-level primitive, and the higher-level one has been cleaned up in the meantime. We'd have to more or less copy all the logic anyway, load validators and delegators, etc.

https://github.com/cosmos/cosmos-sdk/blob/v0.42.2/x/distribution/keeper/grpc_query.go#L119-L157

I will just stick with the current approach.

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

No branches or pull requests

1 participant