From 46e5278355228e98866efdd004861084744ae449 Mon Sep 17 00:00:00 2001 From: Austin Abell Date: Thu, 26 Sep 2019 11:50:55 -0400 Subject: [PATCH] Add pruning option to application (#113) --- cmd/emintd/main.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/cmd/emintd/main.go b/cmd/emintd/main.go index 20bc4ba9..21b067f8 100644 --- a/cmd/emintd/main.go +++ b/cmd/emintd/main.go @@ -4,22 +4,25 @@ import ( "encoding/json" "io" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/server" + "github.com/cosmos/cosmos-sdk/store" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/genaccounts" genaccscli "github.com/cosmos/cosmos-sdk/x/genaccounts/client/cli" + genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" "github.com/cosmos/cosmos-sdk/x/staking" "github.com/spf13/cobra" - "github.com/tendermint/tendermint/libs/cli" + "github.com/spf13/viper" - sdk "github.com/cosmos/cosmos-sdk/types" - genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" emintapp "github.com/cosmos/ethermint/app" abci "github.com/tendermint/tendermint/abci/types" - dbm "github.com/tendermint/tm-db" + "github.com/tendermint/tendermint/libs/cli" tmlog "github.com/tendermint/tendermint/libs/log" tmtypes "github.com/tendermint/tendermint/types" + dbm "github.com/tendermint/tm-db" ) func main() { @@ -64,7 +67,8 @@ func main() { } func newApp(logger tmlog.Logger, db dbm.DB, traceStore io.Writer) abci.Application { - return emintapp.NewEthermintApp(logger, db, true, 0) + return emintapp.NewEthermintApp(logger, db, true, 0, + baseapp.SetPruning(store.NewPruningOptionsFromString(viper.GetString("pruning")))) } func exportAppStateAndTMValidators(