diff options
author | Felföldi Zsolt <zsfelfoldi@gmail.com> | 2018-03-09 17:55:03 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-03-09 17:55:03 +0800 |
commit | 1488fdaf19cebdb79478bd4949b99d3f0d053419 (patch) | |
tree | 6942526d6f9e59ee1065f9c4dab5bf5472398918 /cmd/utils | |
parent | 77da203547b83c70d12552a86bb7beee52f6383e (diff) | |
download | dexon-1488fdaf19cebdb79478bd4949b99d3f0d053419.tar dexon-1488fdaf19cebdb79478bd4949b99d3f0d053419.tar.gz dexon-1488fdaf19cebdb79478bd4949b99d3f0d053419.tar.bz2 dexon-1488fdaf19cebdb79478bd4949b99d3f0d053419.tar.lz dexon-1488fdaf19cebdb79478bd4949b99d3f0d053419.tar.xz dexon-1488fdaf19cebdb79478bd4949b99d3f0d053419.tar.zst dexon-1488fdaf19cebdb79478bd4949b99d3f0d053419.zip |
cmd/utils: fix maxpeers vs lightpeers logic (#16125)
Diffstat (limited to 'cmd/utils')
-rw-r--r-- | cmd/utils/flags.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 96e8b72ec..ff78a0fcc 100644 --- a/cmd/utils/flags.go +++ b/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 |