fix panic when start a node with snapshot (#673)

* fix panic when start a node with snapshot

* change the return value of evm.NewKeeper to a pointer, roll back the before change

* add changelog

* fix importer test
This commit is contained in:
KamiD
2021-01-07 08:55:01 -03:00
committed by GitHub
parent 9cbb4dcf6d
commit ffbb207655
9 changed files with 23 additions and 22 deletions
+2 -2
View File
@@ -44,14 +44,14 @@ type Keeper struct {
// NewKeeper generates new evm module keeper
func NewKeeper(
cdc *codec.Codec, storeKey sdk.StoreKey, paramSpace params.Subspace, ak types.AccountKeeper,
) Keeper {
) *Keeper {
// set KeyTable if it has not already been set
if !paramSpace.HasKeyTable() {
paramSpace = paramSpace.WithKeyTable(types.ParamKeyTable())
}
// NOTE: we pass in the parameter space to the CommitStateDB in order to use custom denominations for the EVM operations
return Keeper{
return &Keeper{
cdc: cdc,
storeKey: storeKey,
accountKeeper: ak,
+1 -1
View File
@@ -43,7 +43,7 @@ func (suite *KeeperTestSuite) SetupTest() {
suite.app = app.Setup(checkTx)
suite.ctx = suite.app.BaseApp.NewContext(checkTx, abci.Header{Height: 1, ChainID: "ethermint-3", Time: time.Now().UTC()})
suite.querier = keeper.NewQuerier(suite.app.EvmKeeper)
suite.querier = keeper.NewQuerier(*suite.app.EvmKeeper)
suite.address = ethcmn.HexToAddress(addrHex)
balance := sdk.NewCoins(ethermint.NewPhotonCoin(sdk.ZeroInt()))