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

fix: add missing nil check in store.GetStore #9354

Merged
merged 2 commits into from
May 19, 2021
Merged

Conversation

robert-zaremba
Copy link
Collaborator

Description

Both store.GetStore and store.GetKVStore are missing nil checks which yield to more ugly panics.


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@codecov
Copy link

codecov bot commented May 18, 2021

Codecov Report

Merging #9354 (79fa51f) into master (9d05048) will decrease coverage by 0.07%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9354      +/-   ##
==========================================
- Coverage   60.38%   60.31%   -0.08%     
==========================================
  Files         587      588       +1     
  Lines       36920    36976      +56     
==========================================
+ Hits        22294    22301       +7     
- Misses      12651    12699      +48     
- Partials     1975     1976       +1     
Impacted Files Coverage Δ
store/rootmulti/store.go 68.23% <50.00%> (-0.24%) ⬇️
store/cachemulti/store.go 11.32% <80.00%> (ø)

@amaury1093 amaury1093 added the A:automerge Automatically merge PR once all prerequisites pass. label May 19, 2021
@mergify mergify bot merged commit b065e20 into master May 19, 2021
@mergify mergify bot deleted the robert/fix-get-kvstore branch May 19, 2021 08:17
mergify bot pushed a commit that referenced this pull request May 19, 2021
* fix: add missing nil check in store.GetStore

* check nil in rootmulti as well

(cherry picked from commit b065e20)
aaronc pushed a commit that referenced this pull request May 19, 2021
* fix: add missing nil check in store.GetStore

* check nil in rootmulti as well

(cherry picked from commit b065e20)

Co-authored-by: Robert Zaremba <[email protected]>
roysc pushed a commit to vulcanize/cosmos-sdk that referenced this pull request Jun 23, 2021
* fix: add missing nil check in store.GetStore

* check nil in rootmulti as well
BananaLF added a commit to okx/exchain that referenced this pull request Jun 27, 2022
xiangjianmeng added a commit to okx/exchain that referenced this pull request Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C:Store T:Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants