From 64ab751abcaa92ad930ef5dd73cdb36cb924ba03 Mon Sep 17 00:00:00 2001 From: Giulio rebuffo Date: Mon, 9 Sep 2024 16:40:31 +0200 Subject: [PATCH] E3: fix "minimal" and "full" pruning (#11920) --- turbo/cli/flags.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/turbo/cli/flags.go b/turbo/cli/flags.go index 03e0ae462b6..4c7822b1776 100644 --- a/turbo/cli/flags.go +++ b/turbo/cli/flags.go @@ -304,12 +304,12 @@ func ApplyFlagsForEthConfig(ctx *cli.Context, cfg *ethconfig.Config, logger log. // Full mode prunes all but the latest state if ctx.String(PruneModeFlag.Name) == "full" { mode.Blocks = prune.Distance(math.MaxUint64) - mode.History = prune.Distance(0) + mode.History = prune.Distance(config3.DefaultPruneDistance) } // Minimal mode prunes all but the latest state including blocks if ctx.String(PruneModeFlag.Name) == "minimal" { - mode.Blocks = prune.Distance(2048) // 2048 is just some blocks to allow reorgs - mode.History = prune.Distance(0) + mode.Blocks = prune.Distance(config3.DefaultPruneDistance) + mode.History = prune.Distance(config3.DefaultPruneDistance) } if err != nil {