From 1f043102612b8a83639483616b916ec292cb13db Mon Sep 17 00:00:00 2001 From: islishude Date: Sun, 3 Nov 2024 11:17:20 +0800 Subject: [PATCH] cmd/utils: always use hash scheme for archive node --- cmd/utils/flags.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index f083a25f90..8c50c63348 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1710,9 +1710,11 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { log.Warn("The flag --txlookuplimit is deprecated and will be removed, please use --history.transactions") cfg.TransactionHistory = ctx.Uint64(TxLookupLimitFlag.Name) } - if ctx.String(GCModeFlag.Name) == "archive" && cfg.TransactionHistory != 0 { - cfg.TransactionHistory = 0 - log.Warn("Disabled transaction unindexing for archive node") + if cfg.NoPruning { + if cfg.TransactionHistory != 0 { + cfg.TransactionHistory = 0 + log.Warn("Disabled transaction unindexing for archive node") + } cfg.StateScheme = rawdb.HashScheme log.Warn("Forcing hash state-scheme for archive mode")