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

refactor: prevent panicking with params #1864

Merged
merged 12 commits into from
Mar 15, 2024
Merged

Conversation

lumtis
Copy link
Member

@lumtis lumtis commented Mar 8, 2024

Description

Use GetParamsIfExist to prevent panic

Closes: #1860

Copy link

codecov bot commented Mar 8, 2024

Codecov Report

Attention: Patch coverage is 79.31034% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 49.95%. Comparing base (ce26536) to head (fa948ce).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1864      +/-   ##
===========================================
+ Coverage    49.88%   49.95%   +0.06%     
===========================================
  Files          219      220       +1     
  Lines        12712    12722      +10     
===========================================
+ Hits          6342     6355      +13     
+ Misses        5928     5925       -3     
  Partials       442      442              
Files Coverage Δ
x/emissions/abci.go 79.34% <100.00%> (-0.23%) ⬇️
x/emissions/genesis.go 100.00% <100.00%> (ø)
x/emissions/keeper/params.go 100.00% <100.00%> (ø)
x/emissions/types/distributions.go 100.00% <100.00%> (ø)
x/observer/genesis.go 76.51% <100.00%> (ø)
x/observer/keeper/params.go 100.00% <ø> (+37.50%) ⬆️
x/observer/migrations/v4/migrate.go 77.77% <ø> (ø)
x/observer/migrations/v5/migrate.go 83.78% <100.00%> (ø)
x/observer/migrations/v7/migrate.go 100.00% <100.00%> (ø)
x/observer/keeper/ballot.go 61.36% <0.00%> (ø)
... and 1 more

@lumtis lumtis marked this pull request as ready for review March 9, 2024 15:52
x/emissions/keeper/params.go Outdated Show resolved Hide resolved
x/emissions/types/distributions.go Outdated Show resolved Hide resolved
x/emissions/types/distributions.go Show resolved Hide resolved
@lumtis lumtis requested a review from skosito March 12, 2024 09:12
@lumtis lumtis requested a review from kingpinXD March 14, 2024 09:04
@lumtis lumtis merged commit 0361a91 into develop Mar 15, 2024
21 checks passed
@lumtis lumtis deleted the refactor/use-GetParamsIfExist branch March 15, 2024 07:35
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.

Prevent reading params to panic
3 participants