Skip to content

Commit 131fc21

Browse files
lightclientfjl
authored andcommitted
cmd/utils: add comment about overriding network id
1 parent 68ad6ac commit 131fc21

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
@@ -1917,6 +1917,9 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
19171917
}
19181918
}
19191919
if ctx.IsSet(NetworkIdFlag.Name) {
1920+
// Typically it's best to automatically set the network id to the chain id,
1921+
// by not passing the network id flag at all. Emit a warning when set
1922+
// explicitly in case overriding the network id is not the user's intention.
19201923
id := ctx.Uint64(NetworkIdFlag.Name)
19211924
log.Warn("Setting network id with flag", "id", id)
19221925
cfg.NetworkId = id

0 commit comments

Comments
 (0)