From c66e81a7f31014fbedf6ce27c87679fb38aa6610 Mon Sep 17 00:00:00 2001 From: jsvisa Date: Sat, 28 Jun 2025 07:25:16 +0800 Subject: [PATCH] Revert "enable preimage for hash only" This reverts commit 623d45a1d2312db0abbd09b0cf006f6ffe8e508d. Signed-off-by: jsvisa --- cmd/utils/flags.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 6872b6e594..01de680278 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1634,11 +1634,9 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { } // Read the value from the flag no matter if it's set or not. cfg.Preimages = ctx.Bool(CachePreimagesFlag.Name) - // Only check the user's input for hash mode here; path is the default scheme, - // so we don't need to check the actual database scheme. - if cfg.NoPruning && !cfg.Preimages && ctx.String(StateSchemeFlag.Name) == rawdb.HashScheme { + if cfg.NoPruning && !cfg.Preimages { cfg.Preimages = true - log.Info("Enabling recording of key preimages: required for archive mode with hash state scheme") + log.Info("Enabling recording of key preimages since archive mode is used") } if ctx.IsSet(StateHistoryFlag.Name) { cfg.StateHistory = ctx.Uint64(StateHistoryFlag.Name)