cmd/geth: add some DNS flags

This commit is contained in:
Felix Lange 2020-02-06 22:16:03 +01:00
parent db705bb45d
commit 36d754cbc6
3 changed files with 9 additions and 0 deletions

View file

@ -131,6 +131,7 @@ var (
utils.NetrestrictFlag,
utils.NodeKeyFileFlag,
utils.NodeKeyHexFlag,
utils.DisableDNSFlag,
utils.DeveloperFlag,
utils.DeveloperPeriodFlag,
utils.TestnetFlag,

View file

@ -191,6 +191,7 @@ var AppHelpFlagGroups = []flagGroup{
utils.NetrestrictFlag,
utils.NodeKeyFileFlag,
utils.NodeKeyHexFlag,
utils.DisableDNSFlag,
},
},
{

View file

@ -658,6 +658,10 @@ var (
Name: "netrestrict",
Usage: "Restricts network communication to the given IP networks (CIDR masks)",
}
DisableDNSFlag = cli.BoolFlag{
Name: "nodns",
Usage: "disables DNS-based node discovery",
}
// ATM the url is left to the user and deployment to
JSpathFlag = cli.StringFlag{
@ -1477,6 +1481,9 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
if ctx.GlobalIsSet(RPCGlobalGasCap.Name) {
cfg.RPCGasCap = new(big.Int).SetUint64(ctx.GlobalUint64(RPCGlobalGasCap.Name))
}
if ctx.GlobalIsSet(DisableDNSFlag.Name) {
cfg.DisableDNSDiscovery = ctx.GlobalBool(DisableDNSFlag.Name)
}
// Override any default configs for hard coded networks.
switch {