From 6d0c078409d49a9312288fa72d6ac73ad4a6c961 Mon Sep 17 00:00:00 2001 From: yaruwangway <69694322+yaruwangway@users.noreply.github.com> Date: Mon, 10 Oct 2022 12:44:09 +0200 Subject: [PATCH] feat: add globalfee initModule method for upgrade handler (#1795) * feat: add globalfee initModule for upgrade handler * chore: add comment for globalfee initModule * fix: lint --- x/globalfee/module.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/x/globalfee/module.go b/x/globalfee/module.go index 8c1103467ec89..e010480e4c218 100644 --- a/x/globalfee/module.go +++ b/x/globalfee/module.go @@ -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)