aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/utils/flags.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-05-04 22:35:49 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-05-07 20:30:56 +0800
commit4d5a719f256d7dfbaab2cc9c632cd7996067508f (patch)
treed4841e10035f4fd557ef09f2f4c2f478dc3bf762 /cmd/utils/flags.go
parentaf932177755f5f839ab29b16dc490d3e1bb3708d (diff)
downloaddexon-4d5a719f256d7dfbaab2cc9c632cd7996067508f.tar
dexon-4d5a719f256d7dfbaab2cc9c632cd7996067508f.tar.gz
dexon-4d5a719f256d7dfbaab2cc9c632cd7996067508f.tar.bz2
dexon-4d5a719f256d7dfbaab2cc9c632cd7996067508f.tar.lz
dexon-4d5a719f256d7dfbaab2cc9c632cd7996067508f.tar.xz
dexon-4d5a719f256d7dfbaab2cc9c632cd7996067508f.tar.zst
dexon-4d5a719f256d7dfbaab2cc9c632cd7996067508f.zip
cmd, eth, p2p: introduce pending peer cli arg, add tests
Diffstat (limited to 'cmd/utils/flags.go')
-rw-r--r--cmd/utils/flags.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index 1fdc8dfe5..0a1d650d6 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -197,6 +197,11 @@ var (
Usage: "Maximum number of network peers (network disabled if set to 0)",
Value: 16,
}
+ MaxPendingPeersFlag = cli.IntFlag{
+ Name: "maxpendpeers",
+ Usage: "Maximum number of pending connection attempts (defaults used if set to 0)",
+ Value: 0,
+ }
ListenPortFlag = cli.IntFlag{
Name: "port",
Usage: "Network listening port",
@@ -286,6 +291,7 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config {
AccountManager: GetAccountManager(ctx),
VmDebug: ctx.GlobalBool(VMDebugFlag.Name),
MaxPeers: ctx.GlobalInt(MaxPeersFlag.Name),
+ MaxPendingPeers: ctx.GlobalInt(MaxPendingPeersFlag.Name),
Port: ctx.GlobalString(ListenPortFlag.Name),
NAT: GetNAT(ctx),
NatSpec: ctx.GlobalBool(NatspecEnabledFlag.Name),