From 439929b9753f4d0299811b7294d3c1a559b5c3a0 Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Tue, 14 Jul 2026 14:45:19 +0800 Subject: [PATCH] cmd/utils, eth/ethconfig: polish --- cmd/utils/flags.go | 10 +++++----- eth/ethconfig/config.go | 2 +- eth/ethconfig/gen_config.go | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 4fa4ff9769..4082717930 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1923,11 +1923,11 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { } if ctx.IsSet(EngineMaxReorgDepthFlag.Name) { cfg.EngineMaxReorgDepth = ctx.Uint64(EngineMaxReorgDepthFlag.Name) - if cfg.EngineMaxReorgDepth != 0 { - log.Info("Set engine API maximum reorg depth", "depth", cfg.EngineMaxReorgDepth) - } else { - log.Info("Engine API reorg depth limit disabled") - } + } + if cfg.EngineMaxReorgDepth != 0 { + log.Info("Engine API maximum reorg depth", "depth", cfg.EngineMaxReorgDepth) + } else { + log.Info("Engine API reorg depth limit disabled") } if ctx.Bool(NoDiscoverFlag.Name) { cfg.EthDiscoveryURLs, cfg.SnapDiscoveryURLs = []string{}, []string{} diff --git a/eth/ethconfig/config.go b/eth/ethconfig/config.go index 8e27a66419..c6f2fadde9 100644 --- a/eth/ethconfig/config.go +++ b/eth/ethconfig/config.go @@ -207,7 +207,7 @@ type Config struct { // EngineMaxReorgDepth is the maximum depth the chain head can be rewound // to an already-canonical ancestor by engine API forkchoiceUpdated calls // (0 = no limit). - EngineMaxReorgDepth uint64 + EngineMaxReorgDepth uint64 `toml:",omitempty"` // OverrideOsaka (TODO: remove after the fork) OverrideOsaka *uint64 `toml:",omitempty"` diff --git a/eth/ethconfig/gen_config.go b/eth/ethconfig/gen_config.go index 4e61b1cccb..167c93e685 100644 --- a/eth/ethconfig/gen_config.go +++ b/eth/ethconfig/gen_config.go @@ -63,7 +63,7 @@ func (c Config) MarshalTOML() (interface{}, error) { RPCGasCap uint64 RPCEVMTimeout time.Duration RPCTxFeeCap float64 - EngineMaxReorgDepth uint64 + EngineMaxReorgDepth uint64 `toml:",omitempty"` OverrideOsaka *uint64 `toml:",omitempty"` OverrideAmsterdam *uint64 `toml:",omitempty"` OverrideBPO1 *uint64 `toml:",omitempty"` @@ -181,7 +181,7 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error { RPCGasCap *uint64 RPCEVMTimeout *time.Duration RPCTxFeeCap *float64 - EngineMaxReorgDepth *uint64 + EngineMaxReorgDepth *uint64 `toml:",omitempty"` OverrideOsaka *uint64 `toml:",omitempty"` OverrideAmsterdam *uint64 `toml:",omitempty"` OverrideBPO1 *uint64 `toml:",omitempty"`