diff --git a/CHANGELOG.md b/CHANGELOG.md index d8997a6f2c..a50a766391 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). # Changelog ## [Unreleased] - Renamed `PollData` and `PollAnswer` to `Poll` and `ProvidedAnswer` ([\#536]((https://github.com/desmos-labs/desmos/issues/536))) -- Enabled snapshot by default ([\#529](https://github.com/desmos-labs/desmos/pull/529)) - ## Version 1.0.3 ### Bug fixes - Fixed the help of the `desmos tx profiles save` command diff --git a/app/desmos/cmd/init.go b/app/desmos/cmd/init.go deleted file mode 100644 index b06adfedd2..0000000000 --- a/app/desmos/cmd/init.go +++ /dev/null @@ -1,39 +0,0 @@ -package cmd - -// DONTCOVER - -import ( - "path/filepath" - - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - srvconfig "github.com/cosmos/cosmos-sdk/server/config" - "github.com/cosmos/cosmos-sdk/types/module" - cosmosgenutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" -) - -// initCmd returns a command that initializes all files needed for Tendermint -// and the respective application. -func initCmd(mbm module.BasicManager, defaultNodeHome string) *cobra.Command { - cmd := cosmosgenutilcli.InitCmd(mbm, defaultNodeHome) - defaultRun := cmd.RunE - cmd.RunE = func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - err := defaultRun(cmd, args) - if err != nil { - return err - } - // Set app.toml file - appConfig := srvconfig.DefaultConfig() - appConfig.Pruning = "custom" - appConfig.PruningKeepRecent = "100" - appConfig.PruningKeepEvery = "500" - appConfig.PruningInterval = "10" - - appConfig.StateSync.SnapshotInterval = 500 - srvconfig.WriteConfigFile(filepath.Join(clientCtx.HomeDir, "config", "app.toml"), appConfig) - return nil - } - return cmd -} diff --git a/app/desmos/cmd/root.go b/app/desmos/cmd/root.go index 1c2fa029f0..fc476ed71b 100644 --- a/app/desmos/cmd/root.go +++ b/app/desmos/cmd/root.go @@ -154,7 +154,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { cfg.Seal() rootCmd.AddCommand( - initCmd(app.ModuleBasics, app.DefaultNodeHome), + cosmosgenutilcli.InitCmd(app.ModuleBasics, app.DefaultNodeHome), cosmosgenutilcli.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome), genutilcli.MigrationsListCmd(), genutilcli.MigrateGenesisCmd(),