Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
x/evm: move SetParams execution location in InitGenesis (#685)
Browse files Browse the repository at this point in the history
* fix-init-evm-genesis-panic

* go fmt file
  • Loading branch information
Ray Green authored Jan 4, 2021
1 parent d27810b commit 64ada18
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/evm/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import (

// InitGenesis initializes genesis state based on exported genesis
func InitGenesis(ctx sdk.Context, k Keeper, accountKeeper types.AccountKeeper, data GenesisState) []abci.ValidatorUpdate { // nolint: interfacer
k.SetParams(ctx, data.Params)

evmDenom := data.Params.EvmDenom

for _, account := range data.Accounts {
Expand Down Expand Up @@ -55,7 +57,6 @@ func InitGenesis(ctx sdk.Context, k Keeper, accountKeeper types.AccountKeeper, d
}

k.SetChainConfig(ctx, data.ChainConfig)
k.SetParams(ctx, data.Params)

// set state objects and code to store
_, err = k.Commit(ctx, false)
Expand Down

0 comments on commit 64ada18

Please sign in to comment.