cmd/utils: fix maxpeers vs lightpeers logic (#16125)

pull/16293/head
Felföldi Zsolt 7 years ago committed by Péter Szilágyi
parent 77da203547
commit 1488fdaf19
  1. 3
      cmd/utils/flags.go

@ -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

Loading…
Cancel
Save