Skip to content

Commit

Permalink
feat: add globalfee initModule method for upgrade handler (cosmos#1795)
Browse files Browse the repository at this point in the history
* feat: add globalfee initModule for upgrade handler

* chore: add comment for globalfee initModule

* fix: lint
  • Loading branch information
yaruwangway authored Oct 10, 2022
1 parent 56144b1 commit 6d0c078
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions x/globalfee/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ func NewAppModule(paramSpace paramstypes.Subspace) *AppModule {
return &AppModule{paramSpace: paramSpace}
}

// InitModule will initialize the globalfee module.
// It should only be called once and as an alternative to InitGenesis.
func (a AppModule) InitModule(ctx sdk.Context, globalfeeParams types.Params) {
a.paramSpace.SetParamSet(ctx, &globalfeeParams)
}

func (a AppModule) InitGenesis(ctx sdk.Context, marshaler codec.JSONCodec, message json.RawMessage) []abci.ValidatorUpdate {
var genesisState types.GenesisState
marshaler.MustUnmarshalJSON(message, &genesisState)
Expand Down

0 comments on commit 6d0c078

Please sign in to comment.