From 7bab55f4ae24480d93fa02b6f445a66dd7b8b888 Mon Sep 17 00:00:00 2001 From: adu-crypto <94821467+adu-crypto@users.noreply.github.com> Date: Thu, 1 Sep 2022 16:42:23 +0800 Subject: [PATCH] feat: Add a cli cmd to prune old states according to current settings (#12742) * add PruningCmd and change PruneStores signature * the mimimum default pruning interval is 10 Co-authored-by: Marko --- simd/cmd/root.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/simd/cmd/root.go b/simd/cmd/root.go index 9b0965458d70..b24a1bd1bc67 100644 --- a/simd/cmd/root.go +++ b/simd/cmd/root.go @@ -20,6 +20,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/debug" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/keys" + "github.com/cosmos/cosmos-sdk/client/pruning" "github.com/cosmos/cosmos-sdk/client/rpc" "github.com/cosmos/cosmos-sdk/server" serverconfig "github.com/cosmos/cosmos-sdk/server/config" @@ -182,6 +183,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { NewTestnetCmd(simapp.ModuleBasics, banktypes.GenesisBalancesIterator{}), debug.Cmd(), config.Cmd(), + pruning.PruningCmd(newApp), ) server.AddCommands(rootCmd, simapp.DefaultNodeHome, newApp, appExport, addModuleInitFlags)