aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-05-27 00:07:24 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-05-27 00:07:24 +0800
commite1a0ee8fc541bd73ac5d5a0cdacfe5265fcef833 (patch)
treee60fe4e4aa35fc4d62f186c04b6d0aa85784ca7a /cmd
parent278183c7e727f875fb2eae8ceba29bfd4b01afc2 (diff)
downloaddexon-e1a0ee8fc541bd73ac5d5a0cdacfe5265fcef833.tar
dexon-e1a0ee8fc541bd73ac5d5a0cdacfe5265fcef833.tar.gz
dexon-e1a0ee8fc541bd73ac5d5a0cdacfe5265fcef833.tar.bz2
dexon-e1a0ee8fc541bd73ac5d5a0cdacfe5265fcef833.tar.lz
dexon-e1a0ee8fc541bd73ac5d5a0cdacfe5265fcef833.tar.xz
dexon-e1a0ee8fc541bd73ac5d5a0cdacfe5265fcef833.tar.zst
dexon-e1a0ee8fc541bd73ac5d5a0cdacfe5265fcef833.zip
cmd/geth, cmd/utils, eth, p2p: pass and honor a no discovery flag
Diffstat (limited to 'cmd')
-rw-r--r--cmd/geth/main.go1
-rw-r--r--cmd/utils/flags.go6
2 files changed, 6 insertions, 1 deletions
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index 56f383b77..9d935efbd 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -260,6 +260,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso
utils.AutoDAGFlag,
utils.NATFlag,
utils.NatspecEnabledFlag,
+ utils.NoDiscoverFlag,
utils.NodeKeyFileFlag,
utils.NodeKeyHexFlag,
utils.RPCEnabledFlag,
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index cb774aa5b..155110ddc 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -235,6 +235,10 @@ var (
Usage: "NAT port mapping mechanism (any|none|upnp|pmp|extip:<IP>)",
Value: "any",
}
+ NoDiscoverFlag = cli.BoolFlag{
+ Name: "nodiscover",
+ Usage: "Disables the peer discovery mechanism (manual peer addition)",
+ }
WhisperEnabledFlag = cli.BoolFlag{
Name: "shh",
Usage: "Enable whisper",
@@ -312,6 +316,7 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config {
Port: ctx.GlobalString(ListenPortFlag.Name),
NAT: GetNAT(ctx),
NatSpec: ctx.GlobalBool(NatspecEnabledFlag.Name),
+ Discovery: !ctx.GlobalBool(NoDiscoverFlag.Name),
NodeKey: GetNodeKey(ctx),
Shh: ctx.GlobalBool(WhisperEnabledFlag.Name),
Dial: true,
@@ -320,7 +325,6 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config {
SolcPath: ctx.GlobalString(SolcPathFlag.Name),
AutoDAG: ctx.GlobalBool(AutoDAGFlag.Name) || ctx.GlobalBool(MiningEnabledFlag.Name),
}
-
}
func GetChain(ctx *cli.Context) (*core.ChainManager, common.Database, common.Database) {