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

Use enum instead of int32 for BondStatus #7499

Merged
merged 34 commits into from
Oct 12, 2020
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
267ef39
Migrate staking module
amaury1093 Oct 6, 2020
0d50d31
Merge branch 'master' into am-migrate-followup
amaury1093 Oct 6, 2020
586ea7a
Merge branch 'master' of ssh://github.com/cosmos/cosmos-sdk into am-m…
amaury1093 Oct 7, 2020
075a4ef
Add gov legacy
amaury1093 Oct 7, 2020
e1521d5
Add comments
amaury1093 Oct 7, 2020
ef05dde
Add x/distrib
amaury1093 Oct 7, 2020
e8488ae
x/crisis
amaury1093 Oct 7, 2020
ab59c83
x/mint
amaury1093 Oct 7, 2020
a735812
Merge branch 'master' into am-migrate-followup
amaury1093 Oct 7, 2020
7770196
Fix test
amaury1093 Oct 7, 2020
0f8cf26
Merge branch 'master' into am-migrate-followup
amaury1093 Oct 8, 2020
f084fe1
migrate x/genutil
amaury1093 Oct 9, 2020
a97ca37
Merge branch 'master' of ssh://github.com/cosmos/cosmos-sdk into am-m…
amaury1093 Oct 9, 2020
846f63d
Merge branch 'am-migrate-followup' of ssh://github.com/cosmos/cosmos-…
amaury1093 Oct 9, 2020
eb0a7ab
Fix lint
amaury1093 Oct 9, 2020
5d608ac
Fix staking constants
amaury1093 Oct 9, 2020
06cb049
Fix test
amaury1093 Oct 9, 2020
b4d4289
Update x/genutil/legacy/v040/migrate.go
amaury1093 Oct 9, 2020
b63535d
Add migrate script instead of change BondStatus constants
amaury1093 Oct 9, 2020
049ca8d
Change staking bondStatus to enum
amaury1093 Oct 9, 2020
9ca4e39
Merge branch 'am-migrate-followup' of ssh://github.com/cosmos/cosmos-…
amaury1093 Oct 9, 2020
6fcc163
Fix test
amaury1093 Oct 9, 2020
2bc7a87
Fix another test
amaury1093 Oct 9, 2020
f0cd710
Remove staking exported
amaury1093 Oct 9, 2020
bcc9db2
Merge branch 'am-migrate-followup' into am-migrate-followup-staking
amaury1093 Oct 9, 2020
2379a24
fix references
amaury1093 Oct 9, 2020
7c276aa
Better constants
amaury1093 Oct 9, 2020
6d0560b
Merge branch 'master' of ssh://github.com/cosmos/cosmos-sdk into am-m…
amaury1093 Oct 12, 2020
7c4329a
Fix build
amaury1093 Oct 12, 2020
510c3b6
Fix lint
amaury1093 Oct 12, 2020
bd03ff3
Remove buf version
amaury1093 Oct 12, 2020
8ed1fdc
Fix tests
amaury1093 Oct 12, 2020
8fa8bf0
Fix test
amaury1093 Oct 12, 2020
fe7e6ad
Merge branch 'master' into am-migrate-followup-staking
alexanderbez Oct 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix lint
  • Loading branch information
amaury1093 committed Oct 9, 2020
commit eb0a7ab91d8a1136efcb77f15c044822202aed2e
7 changes: 3 additions & 4 deletions x/genutil/legacy/v040/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
v040evidence "github.com/cosmos/cosmos-sdk/x/evidence/legacy/v040"
v039genutil "github.com/cosmos/cosmos-sdk/x/genutil/legacy/v039"
"github.com/cosmos/cosmos-sdk/x/genutil/types"
v040genutil "github.com/cosmos/cosmos-sdk/x/genutil/types"
v036gov "github.com/cosmos/cosmos-sdk/x/gov/legacy/v036"
v040gov "github.com/cosmos/cosmos-sdk/x/gov/legacy/v040"
v039mint "github.com/cosmos/cosmos-sdk/x/mint/legacy/v039"
Expand All @@ -28,8 +27,8 @@ import (
v040staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v040"
)

func migrateGenutil(oldGenState v039genutil.GenesisState) *v040genutil.GenesisState {
return &v040genutil.GenesisState{
func migrateGenutil(oldGenState v039genutil.GenesisState) *types.GenesisState {
return &types.GenesisState{
GenTxs: oldGenState.GenTxs,
}
}
Expand Down Expand Up @@ -189,7 +188,7 @@ func Migrate(appState types.AppMap, clientCtx client.Context) types.AppMap {

// Migrate relative source genesis application state and marshal it into
// the respective key.
appState[v040genutil.ModuleName] = v040Codec.MustMarshalJSON(migrateGenutil(genutilGenState))
appState[ModuleName] = v040Codec.MustMarshalJSON(migrateGenutil(genutilGenState))
}

return appState
Expand Down