forked from cerc-io/laconicd-deprecated
4a6f4fd6e0
* upgrade geth and fix build * add support for * update EIPs * fix keeper tests * update traceTx function with latest geth changes * remove unnecessary comments * fix tests * update proto * add migrations * update module version * fix grpc test * fix lint * fix lint * update changelog * fix typo * remove unnecessary format logs * Update proto/ethermint/evm/v1/evm.proto Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * remove debug true on default * update comments * fixing ante tests * fixed cycle imports on migrate_test * fix wrong naming * update comment Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
26 lines
818 B
Go
26 lines
818 B
Go
package v3
|
|
|
|
import (
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
|
|
"github.com/evmos/ethermint/x/evm/types"
|
|
)
|
|
|
|
// MigrateStore sets the default for GrayGlacierBlock and MergeNetsplitBlock in ChainConfig parameter.
|
|
func MigrateStore(ctx sdk.Context, paramstore *paramtypes.Subspace) error {
|
|
if !paramstore.HasKeyTable() {
|
|
ps := paramstore.WithKeyTable(types.ParamKeyTable())
|
|
paramstore = &ps
|
|
}
|
|
prevConfig := &types.ChainConfig{}
|
|
paramstore.GetIfExists(ctx, types.ParamStoreKeyChainConfig, prevConfig)
|
|
|
|
defaultConfig := types.DefaultChainConfig()
|
|
|
|
prevConfig.GrayGlacierBlock = defaultConfig.GrayGlacierBlock
|
|
prevConfig.MergeNetsplitBlock = defaultConfig.MergeNetsplitBlock
|
|
|
|
paramstore.Set(ctx, types.ParamStoreKeyChainConfig, prevConfig)
|
|
return nil
|
|
}
|