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

Support gaps in query code list #246

Merged
merged 1 commit into from
Aug 6, 2020
Merged

Support gaps in query code list #246

merged 1 commit into from
Aug 6, 2020

Conversation

alpe
Copy link
Contributor

@alpe alpe commented Aug 6, 2020

With the genesis import we allow gaps in the codeID range. Before the query handler would return early on a gap but now it will handle gaps and return all elements.

@codecov
Copy link

codecov bot commented Aug 6, 2020

Codecov Report

Merging #246 into master will increase coverage by 0.68%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #246      +/-   ##
==========================================
+ Coverage   72.47%   73.15%   +0.68%     
==========================================
  Files          27       27              
  Lines        2652     2649       -3     
==========================================
+ Hits         1922     1938      +16     
+ Misses        617      597      -20     
- Partials      113      114       +1     
Impacted Files Coverage Δ
x/wasm/internal/keeper/querier.go 54.96% <100.00%> (+13.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update de9ebe8...0e6d724. Read the comment docs.

Copy link
Member

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

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

Nice fix. Thank you

if res == nil {
break
}
keeper.IterateCodeInfos(ctx, func(i uint64, res types.CodeInfo) bool {
Copy link
Member

Choose a reason for hiding this comment

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

Ah, and the function was already there.

@ethanfrey ethanfrey merged commit 3a9bd38 into master Aug 6, 2020
@ethanfrey ethanfrey deleted the fix_code_list branch August 6, 2020 12:05
zemyblue pushed a commit to Finschia/wasmd that referenced this pull request Jan 2, 2023
zemyblue pushed a commit to Finschia/wasmd that referenced this pull request Jan 2, 2023
…ster

* remotes/gaia/master: (38 commits)
  Merge PR CosmWasm#259: Bump SDK master commit
  Exec go mod tidy (CosmWasm#267)
  Merge PR CosmWasm#265: add version v2.0.5 to CHANGELOG
  Fix broken link in delegator guide (CosmWasm#262)
  docs: removed redundant readme.md (CosmWasm#261)
  Merge PR CosmWasm#258: Bump github.com/spf13/viper from 1.6.1 to 1.6.2
  Merge PR CosmWasm#250: Docs-update
  Merge PR CosmWasm#256: Bump github.com/pkg/errors from 0.9.0 to 0.9.1
  Merge PR CosmWasm#255: Bump github.com/pkg/errors from 0.8.1 to 0.9.0
  Merge PR CosmWasm#253: Bump SDK master commit
  Merge PR CosmWasm#252: v2.0.4 Changelog
  Merge PR CosmWasm#249: docker image build and upload for release tags
  Merge PR CosmWasm#247: Update SDK Commit & Update CLI Doc
  Merge PR CosmWasm#246: Update Archive page with explorers
  Merge PR CosmWasm#245: archives
  Bump SDK commit to the latest master (CosmWasm#239)
  Merge PR CosmWasm#215: Update simulation tests
  Update join-mainnet.md (CosmWasm#229)
  Incorporate SDK's latest changes (CosmWasm#227)
  Merge PR CosmWasm#221: Hide unnecessarily exported function to better coverage report
  ...
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