Skip to content

Commit

Permalink
E3: fix "minimal" and "full" pruning (#11920)
Browse files Browse the repository at this point in the history
  • Loading branch information
Giulio2002 committed Sep 9, 2024
1 parent 6d15c01 commit 64ab751
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions turbo/cli/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 64ab751

Please sign in to comment.