eth: reduce parallel lookups to 2

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2025-08-15 13:45:30 +02:00
parent 7bebcd1043
commit e5af7d1c65
No known key found for this signature in database
GPG key ID: 0FE274EE8C95166E

View file

@ -77,8 +77,10 @@ const (
// sources (disc/v4 and disc/v5). We set this number large enough to be able to // sources (disc/v4 and disc/v5). We set this number large enough to be able to
// feed the dial queue with enough peers. Since the whole discovery process is triggered // feed the dial queue with enough peers. Since the whole discovery process is triggered
// only when dial candidates are needed, we can keep this number high without worrying // only when dial candidates are needed, we can keep this number high without worrying
// about overloading the DHT. // about overloading the DHT. Only caveat is that in a small network, where maxpeers is
discoveryParallelLookups = 3 // higher than the actual number of nodes, this may lead to continuous lookups. We don't
// yet have a self-tuning solution for this, so we keep the value at 2.
discoveryParallelLookups = 2
// discoveryPrefetchBuffer is the number of peers to pre-fetch from a discovery // discoveryPrefetchBuffer is the number of peers to pre-fetch from a discovery
// source. It is useful to avoid the negative effects of potential longer timeouts // source. It is useful to avoid the negative effects of potential longer timeouts