forked from cerc-io/laconicd-deprecated
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:
@@ -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,
|
||||
|
||||
@@ -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()))
|
||||
|
||||
Reference in New Issue
Block a user