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

Add Proper query to BaseApp and rootMultiStore #404

Merged
merged 9 commits into from
Feb 7, 2018

Conversation

ethanfrey
Copy link
Contributor

@ethanfrey ethanfrey commented Jan 30, 2018

Add a Queryable interface, implemented by both rootMultiStore and iavlStore.
Path is assumed to be "/storename/subpath"

Multistore will look up the store by name, and if it is registered, and implements Queryable,
then it delegates the query to the substore.
iavlStore implements Query as the old sdk did in the application level. Tested it works directly on the iavlStore as expected.

@ethanfrey ethanfrey requested a review from jaekwon as a code owner January 30, 2018 19:03
@codecov-io
Copy link

codecov-io commented Jan 30, 2018

Codecov Report

Merging #404 into develop will increase coverage by 0.7%.
The diff coverage is 64.86%.

@@            Coverage Diff             @@
##           develop     #404     +/-   ##
==========================================
+ Coverage    51.42%   52.13%   +0.7%     
==========================================
  Files           34       34             
  Lines         1548     1619     +71     
==========================================
+ Hits           796      844     +48     
- Misses         702      721     +19     
- Partials        50       54      +4


"golang.org/x/crypto/ripemd160"

Copy link
Contributor

Choose a reason for hiding this comment

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

No line between external imports.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://github.com/tendermint/coding/blob/master/go/coding_standard.md#importing-libraries

In some cases, it's nice to separate into three: standard lib, external libs, tendermint libs.

@ethanfrey ethanfrey force-pushed the feature/multi-query branch from a65826c to 7e7f480 Compare February 6, 2018 18:18
@cosmos cosmos deleted a comment from adrianbrink Feb 6, 2018
@cosmos cosmos deleted a comment from ethanfrey Feb 6, 2018
@cosmos cosmos deleted a comment from adrianbrink Feb 6, 2018
@cosmos cosmos deleted a comment from adrianbrink Feb 6, 2018
ebuchman
ebuchman previously approved these changes Feb 6, 2018
Copy link
Member

@ebuchman ebuchman left a comment

Choose a reason for hiding this comment

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

Great thanks. Made some minor changes

@ebuchman ebuchman merged commit 9c00dda into develop Feb 7, 2018
@ebuchman ebuchman deleted the feature/multi-query branch February 7, 2018 05:49
ParthDesai pushed a commit to ChorusOne/cosmos-sdk that referenced this pull request Apr 19, 2021
gibson042 pushed a commit to gibson042/cosmos-sdk that referenced this pull request Apr 12, 2024
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.

4 participants