Skip to content

Commit cd3f9b2

Browse files
authored
cmd/utils: fix disabling cache preimages through config file (#33330)
1 parent 5d51208 commit cd3f9b2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/utils/flags.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,8 +1683,9 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
16831683
if ctx.IsSet(CacheNoPrefetchFlag.Name) {
16841684
cfg.NoPrefetch = ctx.Bool(CacheNoPrefetchFlag.Name)
16851685
}
1686-
// Read the value from the flag no matter if it's set or not.
1687-
cfg.Preimages = ctx.Bool(CachePreimagesFlag.Name)
1686+
if ctx.IsSet(CachePreimagesFlag.Name) {
1687+
cfg.Preimages = ctx.Bool(CachePreimagesFlag.Name)
1688+
}
16881689
if cfg.NoPruning && !cfg.Preimages {
16891690
cfg.Preimages = true
16901691
log.Info("Enabling recording of key preimages since archive mode is used")

0 commit comments

Comments
 (0)