Correct usage of 'network id' to 'network ID'

This commit is contained in:
Felix Lange 2025-11-28 14:17:15 +01:00
parent 131fc21458
commit 7fb54af404

View file

@ -137,7 +137,7 @@ var (
} }
NetworkIdFlag = &cli.Uint64Flag{ NetworkIdFlag = &cli.Uint64Flag{
Name: "networkid", Name: "networkid",
Usage: "Explicitly set network id (integer)(For testnets: use --sepolia, --holesky, --hoodi instead)", Usage: "Explicitly set network ID (integer)(For testnets: use --sepolia, --holesky, --hoodi instead)",
Value: ethconfig.Defaults.NetworkId, Value: ethconfig.Defaults.NetworkId,
Category: flags.EthCategory, Category: flags.EthCategory,
} }
@ -1917,11 +1917,11 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
} }
} }
if ctx.IsSet(NetworkIdFlag.Name) { if ctx.IsSet(NetworkIdFlag.Name) {
// Typically it's best to automatically set the network id to the chain id, // Typically it's best to automatically set the network ID to the chainID,
// by not passing the network id flag at all. Emit a warning when set // by not passing the --networkid flag at all. Emit a warning when set
// explicitly in case overriding the network id is not the user's intention. // explicitly in case overriding the network ID is not the user's intention.
id := ctx.Uint64(NetworkIdFlag.Name) id := ctx.Uint64(NetworkIdFlag.Name)
log.Warn("Setting network id with flag", "id", id) log.Warn("Setting network ID with command-line flag", "id", id)
cfg.NetworkId = id cfg.NetworkId = id
} }
// Set any dangling config values // Set any dangling config values