From 131fc21458882298b1f343f3bca30b8c2e208537 Mon Sep 17 00:00:00 2001 From: lightclient Date: Wed, 22 Oct 2025 09:50:30 -0600 Subject: [PATCH] cmd/utils: add comment about overriding network id --- cmd/utils/flags.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index c2414d9ca7..98313beb21 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1917,6 +1917,9 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { } } if ctx.IsSet(NetworkIdFlag.Name) { + // Typically it's best to automatically set the network id to the chain id, + // by not passing the network id flag at all. Emit a warning when set + // explicitly in case overriding the network id is not the user's intention. id := ctx.Uint64(NetworkIdFlag.Name) log.Warn("Setting network id with flag", "id", id) cfg.NetworkId = id