From e1a0ee8fc541bd73ac5d5a0cdacfe5265fcef833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 26 May 2015 19:07:24 +0300 Subject: cmd/geth, cmd/utils, eth, p2p: pass and honor a no discovery flag --- cmd/utils/flags.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cmd/utils/flags.go') 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:)", 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) { -- cgit v1.2.3