Skip to content

Commit c9789da

Browse files
author
yihuang
authored
Problem: manual prune cmd is not included (#781)
Solution: - add to root cmd
1 parent 7dc3c4c commit c9789da

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- [cronos#702](https://github.com/crypto-org-chain/cronos/pull/702) Integrate the file state streamer.
1515
- [cronos#714](https://github.com/crypto-org-chain/cronos/pull/714) Add option `iavl-disable-fastnode` to disable iavl fastnode indexing migration.
1616
- [cronos#729](https://github.com/crypto-org-chain/cronos/pull/729) Update dependencies to recent versions.
17+
- [cronos#781](https://github.com/crypto-org-chain/cronos/pull/781) Add prune command.
1718

1819
*September 13, 2022*
1920

cmd/cronosd/cmd/root.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
"github.com/cosmos/cosmos-sdk/client/config"
2727
"github.com/cosmos/cosmos-sdk/client/debug"
2828
"github.com/cosmos/cosmos-sdk/client/flags"
29+
"github.com/cosmos/cosmos-sdk/client/pruning"
2930
"github.com/cosmos/cosmos-sdk/client/rpc"
3031
"github.com/cosmos/cosmos-sdk/server"
3132
servertypes "github.com/cosmos/cosmos-sdk/server/types"
@@ -113,6 +114,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) {
113114
cfg := sdk.GetConfig()
114115
cfg.Seal()
115116

117+
a := appCreator{encodingConfig}
116118
rootCmd.AddCommand(
117119
ethermintclient.ValidateChainID(
118120
WrapInitCmd(app.DefaultNodeHome),
@@ -126,10 +128,10 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) {
126128
ethermintclient.NewTestnetCmd(app.ModuleBasics, banktypes.GenesisBalancesIterator{}),
127129
debug.Cmd(),
128130
config.Cmd(),
131+
pruning.PruningCmd(a.newApp),
129132
// this line is used by starport scaffolding # stargate/root/commands
130133
)
131134

132-
a := appCreator{encodingConfig}
133135
ethermintserver.AddCommands(rootCmd, app.DefaultNodeHome, a.newApp, a.appExport, addModuleInitFlags)
134136
experimental.AddCommands(rootCmd)
135137

0 commit comments

Comments
 (0)