Skip to content

Commit

Permalink
cmd/utils: fix maxpeers vs lightpeers logic (#16125)
Browse files Browse the repository at this point in the history
  • Loading branch information
zsfelfoldi authored and karalabe committed Mar 9, 2018
1 parent 77da203 commit 1488fda
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/utils/flags.go
Expand Up @@ -814,6 +814,9 @@ func SetP2PConfig(ctx *cli.Context, cfg *p2p.Config) {

if ctx.GlobalIsSet(MaxPeersFlag.Name) {
cfg.MaxPeers = ctx.GlobalInt(MaxPeersFlag.Name)
if lightServer && !ctx.GlobalIsSet(LightPeersFlag.Name) {
cfg.MaxPeers += lightPeers
}
} else {
if lightServer {
cfg.MaxPeers += lightPeers
Expand Down

0 comments on commit 1488fda

Please sign in to comment.