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

Query state for specific height using gRPC #7844

Closed
fdymylja opened this issue Nov 6, 2020 · 4 comments
Closed

Query state for specific height using gRPC #7844

fdymylja opened this issue Nov 6, 2020 · 4 comments
Labels
C: gRPC Issues and PRs related to the gRPC service and HTTP gateway.

Comments

@fdymylja
Copy link
Contributor

fdymylja commented Nov 6, 2020

I was wondering if it's possible querying by height using the gRPC client.

I've seen there's a special header defined here https://github.com/cosmos/cosmos-sdk/blob/master/types/grpc/headers.go

But it does not seem to work with grpc queriers.

Example: https://github.com/cosmos/cosmos-sdk/blob/master/x/bank/keeper/grpc_query.go

@amaury1093
Copy link
Contributor

Could you provide details where it does not work?

I added a basic test in server/grpc/server_test.go. I might be a good idea to add a better test: make sure the gRPC query results before and after a tx are not the same.

For the docs, they are tracked in #7657.

@amaury1093 amaury1093 added the C: gRPC Issues and PRs related to the gRPC service and HTTP gateway. label Nov 9, 2020
@fdymylja
Copy link
Contributor Author

fdymylja commented Nov 9, 2020

Ok, I saw the example now it's clear how to do it! Thank you!

@amaury1093
Copy link
Contributor

Should we close this? @fdymylja do you have suggestions to follow-up on this?

@fdymylja
Copy link
Contributor Author

fdymylja commented Nov 9, 2020

Yeah. I will close. Thank you for the help.

@fdymylja fdymylja closed this as completed Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: gRPC Issues and PRs related to the gRPC service and HTTP gateway.
Projects
None yet
Development

No branches or pull requests

2 participants