Merge pull request #840 from karalabe/throttled-dialing

p2p: throttled handshakes
This commit is contained in:
Jeffrey Wilcke
2015-05-08 06:53:40 -07:00
6 changed files with 180 additions and 19 deletions

View File

@ -242,6 +242,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso
utils.JSpathFlag,
utils.ListenPortFlag,
utils.MaxPeersFlag,
utils.MaxPendingPeersFlag,
utils.EtherbaseFlag,
utils.MinerThreadsFlag,
utils.MiningEnabledFlag,

View File

@ -75,6 +75,7 @@ func init() {
utils.LogFileFlag,
utils.LogLevelFlag,
utils.MaxPeersFlag,
utils.MaxPendingPeersFlag,
utils.MinerThreadsFlag,
utils.NATFlag,
utils.NodeKeyFileFlag,

View File

@ -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",
@ -292,6 +297,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),