network: drop minPoolCount magic constant

We have AttemptConnPeers that is closely related, the more we have there the
bigger the network supposedly is, so it's much better than magic minPoolCount.
This commit is contained in:
Roman Khimov 2022-10-24 14:36:10 +03:00
parent af24051bf5
commit 9d6b18adec

View file

@ -38,7 +38,6 @@ const (
defaultExtensiblePoolSize = 20
defaultBroadcastFactor = 0
maxBlockBatch = 200
minPoolCount = 30
)
var (
@ -417,7 +416,7 @@ func (s *Server) run() {
s.discovery.RequestRemote(connN)
}
if s.discovery.PoolCount() < minPoolCount {
if s.discovery.PoolCount() < s.AttemptConnPeers {
s.broadcastHPMessage(NewMessage(CMDGetAddr, payload.NewNullPayload()))
}
select {