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!: move x/staking Init/Export genesis to keeper #11866

Merged
merged 5 commits into from
May 4, 2022

Conversation

alexanderbez
Copy link
Contributor

Description

Move InitGenesis and ExportGenesis to the Keeper type for x/staking as they had no business being separate functions outside the keeper type.

cc @ValarDragon


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@alexanderbez alexanderbez requested a review from a team as a code owner May 3, 2022 21:52
@alexanderbez alexanderbez requested a review from ValarDragon May 3, 2022 21:53
Copy link
Contributor

@ValarDragon ValarDragon left a comment

Choose a reason for hiding this comment

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

This is awesome! Looking forward to so much public API surface decreasing from these keepers

@likhita-809
Copy link
Contributor

@alexanderbez I think we also need to move the related genesis tests to keeper and we need to fix the failing tests because of staking imports in other modules.

@github-actions github-actions bot added C:x/genutil genutil module issues C:x/gov labels May 4, 2022
@alexanderbez alexanderbez added the A:automerge Automatically merge PR once all prerequisites pass. label May 4, 2022
@codecov
Copy link

codecov bot commented May 4, 2022

Codecov Report

Merging #11866 (c53208c) into main (35d3312) will decrease coverage by 0.03%.
The diff coverage is 52.98%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #11866      +/-   ##
==========================================
- Coverage   66.05%   66.02%   -0.04%     
==========================================
  Files         705      671      -34     
  Lines       73614    70718    -2896     
==========================================
- Hits        48625    46689    -1936     
+ Misses      22051    21359     -692     
+ Partials     2938     2670     -268     
Impacted Files Coverage Δ
x/staking/genesis.go 46.15% <ø> (-12.00%) ⬇️
x/staking/module.go 64.78% <50.00%> (+0.89%) ⬆️
x/staking/keeper/genesis.go 53.03% <53.03%> (ø)
x/distribution/simulation/operations.go 80.54% <0.00%> (-9.73%) ⬇️
orm/encoding/ormkv/unique_key.go
orm/model/ormtable/unique.go
orm/model/ormtable/auto_increment.go
orm/encoding/ormfield/uint64.go
orm/model/ormdb/json.go
... and 35 more

@alexanderbez alexanderbez merged commit 35c8146 into main May 4, 2022
@alexanderbez alexanderbez deleted the bez/staking-genesis-mod branch May 4, 2022 13:50
@alexanderbez alexanderbez changed the title refactor: move x/staking Init/Export genesis to keeper refactor!: move x/staking Init/Export genesis to keeper May 4, 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:x/genutil genutil module issues C:x/gov C:x/staking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants