From 937768fb2a4ada49f8e30aa33b5917e035494b8e Mon Sep 17 00:00:00 2001 From: artpav <19916123+artemijspavlovs@users.noreply.github.com> Date: Mon, 29 Jul 2024 10:41:16 +0300 Subject: [PATCH] feat(server): add helper to set default pruning settings (#488) (cherry picked from commit 005f2bb6dd18f40e97046f592dd7cdbd94485024) --- server/config/config.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 server/config/config.go diff --git a/server/config/config.go b/server/config/config.go new file mode 100644 index 00000000..26cd8a60 --- /dev/null +++ b/server/config/config.go @@ -0,0 +1,13 @@ +package config + +import ( + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" + "github.com/cosmos/cosmos-sdk/server/config" +) + +func SetDefaultPruningSettings(cfg *config.Config) { + cfg.Pruning = pruningtypes.PruningOptionNothing + cfg.PruningInterval = "10" + cfg.PruningKeepRecent = "100" + cfg.MinRetainBlocks = 10000 +}