diff --git a/cmd/kvd/main.go b/cmd/kvd/main.go index fc3ae833..cfffa083 100644 --- a/cmd/kvd/main.go +++ b/cmd/kvd/main.go @@ -9,9 +9,9 @@ import ( abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/cli" - dbm "github.com/tendermint/tendermint/libs/db" "github.com/tendermint/tendermint/libs/log" tmtypes "github.com/tendermint/tendermint/types" + dbm "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" @@ -74,11 +74,19 @@ func main() { } func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer) abci.Application { + var cache sdk.MultiStorePersistentCache + + if viper.GetBool(server.FlagInterBlockCache) { + cache = store.NewCommitKVStoreCacheManager() + } + return app.NewApp( logger, db, traceStore, true, invCheckPeriod, baseapp.SetPruning(store.NewPruningOptionsFromString(viper.GetString("pruning"))), baseapp.SetMinGasPrices(viper.GetString(server.FlagMinGasPrices)), - baseapp.SetHaltHeight(uint64(viper.GetInt(server.FlagHaltHeight))), + baseapp.SetHaltHeight(viper.GetUint64(server.FlagHaltHeight)), + baseapp.SetHaltTime(viper.GetUint64(server.FlagHaltTime)), + baseapp.SetInterBlockCache(cache), ) }