From 4aeff92f0c12dd4bedd747f07cd280dcbcdc0c80 Mon Sep 17 00:00:00 2001 From: HuangYi Date: Fri, 2 Dec 2022 10:25:56 +0800 Subject: [PATCH 1/2] Problem: manual prune cmd is not included Solution: - add to root cmd --- CHANGELOG.md | 1 + cmd/cronosd/cmd/root.go | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3253adbc9..192c01d3b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - [cronos#702](https://github.com/crypto-org-chain/cronos/pull/702) Integrate the file state streamer. - [cronos#714](https://github.com/crypto-org-chain/cronos/pull/714) Add option `iavl-disable-fastnode` to disable iavl fastnode indexing migration. - [cronos#729](https://github.com/crypto-org-chain/cronos/pull/729) Update dependencies to recent versions. +- [cronos#]() Add prune command. *September 13, 2022* diff --git a/cmd/cronosd/cmd/root.go b/cmd/cronosd/cmd/root.go index 39f88d7486..3349481928 100644 --- a/cmd/cronosd/cmd/root.go +++ b/cmd/cronosd/cmd/root.go @@ -26,6 +26,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/debug" "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/pruning" "github.com/cosmos/cosmos-sdk/client/rpc" "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/types" @@ -113,6 +114,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { cfg := sdk.GetConfig() cfg.Seal() + a := appCreator{encodingConfig} rootCmd.AddCommand( ethermintclient.ValidateChainID( WrapInitCmd(app.DefaultNodeHome), @@ -126,10 +128,10 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { ethermintclient.NewTestnetCmd(app.ModuleBasics, banktypes.GenesisBalancesIterator{}), debug.Cmd(), config.Cmd(), + pruning.PruningCmd(a.newApp), // this line is used by starport scaffolding # stargate/root/commands ) - a := appCreator{encodingConfig} ethermintserver.AddCommands(rootCmd, app.DefaultNodeHome, a.newApp, a.appExport, addModuleInitFlags) experimental.AddCommands(rootCmd) From 2d10713afc2e544c2eb890488dce1444443cd959 Mon Sep 17 00:00:00 2001 From: yihuang Date: Fri, 2 Dec 2022 10:27:26 +0800 Subject: [PATCH 2/2] Update CHANGELOG.md Signed-off-by: yihuang --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 192c01d3b8..601d0ccd54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ - [cronos#702](https://github.com/crypto-org-chain/cronos/pull/702) Integrate the file state streamer. - [cronos#714](https://github.com/crypto-org-chain/cronos/pull/714) Add option `iavl-disable-fastnode` to disable iavl fastnode indexing migration. - [cronos#729](https://github.com/crypto-org-chain/cronos/pull/729) Update dependencies to recent versions. -- [cronos#]() Add prune command. +- [cronos#781](https://github.com/crypto-org-chain/cronos/pull/781) Add prune command. *September 13, 2022*