Skip to content

Commit

Permalink
chore: use pruning settings from the rdk
Browse files Browse the repository at this point in the history
  • Loading branch information
artemijspavlovs committed Jul 28, 2024
1 parent 5662131 commit efe4c71
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions rollappd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,18 +131,12 @@ func initTendermintConfig() *tmcfg.Config {
// initAppConfig helps to override default appConfig template and configs.
// return "", nil if no custom configuration is required for the application.
func initAppConfig() (string, interface{}) {
customAppTemplate := serverconfig.DefaultConfigTemplate
srvCfg := serverconfig.DefaultConfig()

// Default to no pruning
// With default values when pruning is enabled set to keep 10k blocks, prune states older
// then 100 at an interval of 10 states
srvCfg.Pruning = pruningtypes.PruningOptionNothing
srvCfg.PruningInterval = "10"
srvCfg.PruningKeepRecent = "100"
srvCfg.MinRetainBlocks = 10000

return customAppTemplate, srvCfg
customAppTemplate := serverconfig.DefaultConfigTemplate
srvCfg := serverconfig.DefaultConfig()

rdkserverconfig.SetDefaultPruningSettings(srvCfg)

return customAppTemplate, srvCfg
}

func initRootCmd(
Expand Down

0 comments on commit efe4c71

Please sign in to comment.