Skip to content

Commit

Permalink
cmd/simd: Use server.GetPruningOptionsFromFlags (#6508)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbez committed Jun 25, 2020
1 parent dcd5781 commit 0d1a729
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions simapp/cmd/simd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"github.com/cosmos/cosmos-sdk/server"
"github.com/cosmos/cosmos-sdk/simapp"
"github.com/cosmos/cosmos-sdk/store"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli"
Expand Down Expand Up @@ -84,17 +83,9 @@ func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer) server.Applicati
skipUpgradeHeights[int64(h)] = true
}

pruningStr := viper.GetString(server.FlagPruning)
pruningOpts := storetypes.NewPruningOptionsFromString(pruningStr)

// If 'custom' strategy is provided, we construct the options from individual
// flags. We assume the values have been verified already.
if pruningStr == storetypes.PruningOptionCustom {
pruningOpts = storetypes.NewPruningOptions(
viper.GetUint64(server.FlagPruningKeepRecent),
viper.GetUint64(server.FlagPruningKeepEvery),
viper.GetUint64(server.FlagPruningInterval),
)
pruningOpts, err := server.GetPruningOptionsFromFlags()
if err != nil {
panic(err)
}

// TODO: Make sure custom pruning works.
Expand Down

0 comments on commit 0d1a729

Please sign in to comment.