Skip to content

Commit 2adbe68

Browse files
committed
cmd/utils: add comment about overriding network id
1 parent c61b610 commit 2adbe68

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/utils/flags.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,6 +1911,9 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
19111911
}
19121912
}
19131913
if ctx.IsSet(NetworkIdFlag.Name) {
1914+
// Typically it's best to automatically set the network id to the chain id,
1915+
// by not passing the network id flag at all. Emit a warning when set
1916+
// explicitly in case overriding the network id is not the user's intention.
19141917
id := ctx.Uint64(NetworkIdFlag.Name)
19151918
log.Warn("Setting network id with flag", "id", id)
19161919
cfg.NetworkId = id

0 commit comments

Comments
 (0)