cmd/utils: respect --state.size-tracking=false (#35011)

Passing `--state.size-tracking=false` currently cannot disable state
size tracking when it was enabled by the config file because the CLI
path only turns the config value on.

---------

Co-authored-by: Jared Wasinger <j-wasinger@hotmail.com>
This commit is contained in:
Richard Creighton 2026-05-26 13:44:40 +01:00 committed by GitHub
parent c6b2a27f85
commit cae4c5f93c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1936,8 +1936,8 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
cfg.EthDiscoveryURLs = SplitAndTrim(urls)
}
}
if ctx.Bool(StateSizeTrackingFlag.Name) {
cfg.EnableStateSizeTracking = true
if ctx.IsSet(StateSizeTrackingFlag.Name) {
cfg.EnableStateSizeTracking = ctx.Bool(StateSizeTrackingFlag.Name)
}
// Override any default configs for hard coded networks.
switch {