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:
parent
af24051bf5
commit
9d6b18adec
1 changed files with 1 additions and 2 deletions
|
@ -38,7 +38,6 @@ const (
|
||||||
defaultExtensiblePoolSize = 20
|
defaultExtensiblePoolSize = 20
|
||||||
defaultBroadcastFactor = 0
|
defaultBroadcastFactor = 0
|
||||||
maxBlockBatch = 200
|
maxBlockBatch = 200
|
||||||
minPoolCount = 30
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -417,7 +416,7 @@ func (s *Server) run() {
|
||||||
s.discovery.RequestRemote(connN)
|
s.discovery.RequestRemote(connN)
|
||||||
}
|
}
|
||||||
|
|
||||||
if s.discovery.PoolCount() < minPoolCount {
|
if s.discovery.PoolCount() < s.AttemptConnPeers {
|
||||||
s.broadcastHPMessage(NewMessage(CMDGetAddr, payload.NewNullPayload()))
|
s.broadcastHPMessage(NewMessage(CMDGetAddr, payload.NewNullPayload()))
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
|
|
Loading…
Reference in a new issue