From ace9c512332f8cbf899a166781b3a70dbb6206a2 Mon Sep 17 00:00:00 2001 From: vickkkkkyy Date: Wed, 27 May 2026 15:03:32 +0800 Subject: [PATCH] cmd/utils: fix archive mode detection for TransactionHistory override (#33880) Archive nodes store the full history of transactions in the index. This PR fixes a bug for users who provided the NoPruning field in a YAML config file. Now geth correctly stores full transaction history if archive is configured via YAML. --------- Co-authored-by: Sina Mahmoodi --- cmd/utils/flags.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index a48d9ccef2..77a3bffc8b 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1841,7 +1841,7 @@ 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" { + if cfg.NoPruning { if cfg.TransactionHistory != 0 { cfg.TransactionHistory = 0 log.Warn("Disabled transaction unindexing for archive node")