Skip to content

Commit

Permalink
Merge PR cosmos#5619: proto: migrate params to hybrid codec
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle authored Feb 12, 2020
1 parent 918abee commit 60fdb0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func NewSimApp(
}

// init params keeper and subspaces
app.ParamsKeeper = params.NewKeeper(app.cdc, keys[params.StoreKey], tkeys[params.TStoreKey])
app.ParamsKeeper = params.NewKeeper(appCodec.Params, keys[params.StoreKey], tkeys[params.TStoreKey])
app.subspaces[auth.ModuleName] = app.ParamsKeeper.Subspace(auth.DefaultParamspace)
app.subspaces[bank.ModuleName] = app.ParamsKeeper.Subspace(bank.DefaultParamspace)
app.subspaces[staking.ModuleName] = app.ParamsKeeper.Subspace(staking.DefaultParamspace)
Expand Down
3 changes: 3 additions & 0 deletions codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
distr "github.com/cosmos/cosmos-sdk/x/distribution"
"github.com/cosmos/cosmos-sdk/x/params"
"github.com/cosmos/cosmos-sdk/x/staking"
)

Expand All @@ -13,6 +14,7 @@ import (
type AppCodec struct {
amino *codec.Codec

Params *params.Codec
Staking *staking.Codec
Distribution *distr.Codec
}
Expand All @@ -22,6 +24,7 @@ func NewAppCodec() *AppCodec {

return &AppCodec{
amino: amino,
Params: params.NewCodec(amino),
Staking: staking.NewCodec(amino),
Distribution: distr.NewCodec(amino),
}
Expand Down

0 comments on commit 60fdb0a

Please sign in to comment.