We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8a9457 commit 1611815Copy full SHA for 1611815
cmd/utils/flags.go
@@ -1109,6 +1109,11 @@ func SetP2PConfig(ctx *cli.Context, cfg *p2p.Config) {
1109
if ctx.GlobalIsSet(LightMaxPeersFlag.Name) {
1110
lightPeers = ctx.GlobalInt(LightMaxPeersFlag.Name)
1111
}
1112
+ if lightClient && !ctx.GlobalIsSet(LightLegacyPeersFlag.Name) && !ctx.GlobalIsSet(LightMaxPeersFlag.Name) {
1113
+ // dynamic default - for clients we use 1/10th of the default for servers
1114
+ lightPeers /= 10
1115
+ }
1116
+
1117
if ctx.GlobalIsSet(MaxPeersFlag.Name) {
1118
cfg.MaxPeers = ctx.GlobalInt(MaxPeersFlag.Name)
1119
if lightServer && !ctx.GlobalIsSet(LightLegacyPeersFlag.Name) && !ctx.GlobalIsSet(LightMaxPeersFlag.Name) {
0 commit comments