mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 04:36:42 +00:00
cmd/utils: add comment about overriding network id
This commit is contained in:
parent
68ad6ac0dd
commit
131fc21458
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue