Changed store type for block storage (#117)

This commit is contained in:
Austin Abell 2019-09-30 10:22:29 -04:00 committed by GitHub
parent 1119c650c6
commit 6ba38d6cee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,7 +131,8 @@ func NewEthermintApp(
keys := sdk.NewKVStoreKeys(bam.MainStoreKey, auth.StoreKey, staking.StoreKey,
supply.StoreKey, mint.StoreKey, distr.StoreKey, slashing.StoreKey,
gov.StoreKey, params.StoreKey, evmtypes.EvmStoreKey, evmtypes.EvmCodeKey, evmtypes.EvmBlockKey)
gov.StoreKey, params.StoreKey, evmtypes.EvmStoreKey, evmtypes.EvmCodeKey)
blockKey := sdk.NewKVStoreKey(evmtypes.EvmBlockKey)
tkeys := sdk.NewTransientStoreKeys(staking.TStoreKey, params.TStoreKey)
app := &EthermintApp{
@ -165,7 +166,7 @@ func NewEthermintApp(
app.slashingKeeper = slashing.NewKeeper(app.cdc, keys[slashing.StoreKey], &stakingKeeper,
slashingSubspace, slashing.DefaultCodespace)
app.crisisKeeper = crisis.NewKeeper(crisisSubspace, invCheckPeriod, app.supplyKeeper, auth.FeeCollectorName)
app.evmKeeper = evm.NewKeeper(app.accountKeeper, keys[evmtypes.EvmStoreKey], keys[evmtypes.EvmCodeKey], keys[evmtypes.EvmBlockKey], cdc)
app.evmKeeper = evm.NewKeeper(app.accountKeeper, keys[evmtypes.EvmStoreKey], keys[evmtypes.EvmCodeKey], blockKey, cdc)
// register the proposal types
govRouter := gov.NewRouter()
@ -217,6 +218,8 @@ func NewEthermintApp(
// initialize stores
app.MountKVStores(keys)
app.MountTransientStores(tkeys)
// Mount block hash mapping key as DB (no need for historical queries)
app.MountStore(blockKey, sdk.StoreTypeDB)
// initialize BaseApp
app.SetInitChainer(app.InitChainer)