mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-01-21 23:43:46 +00:00
network: take into account good known peers when thinking of GetAddr
They will be returned to pool when disconnected anyway. On a smaller network this can make a difference because there are not a lot of addresses in the pool usually. Signed-off-by: Roman Khimov <roman@nspcc.ru>
This commit is contained in:
parent
2bc41dbe30
commit
703bf6c458
1 changed files with 1 additions and 1 deletions
|
@ -499,7 +499,7 @@ func (s *Server) run() {
|
|||
s.discovery.RequestRemote(min(s.AttemptConnPeers, optimalN-peerN))
|
||||
}
|
||||
|
||||
if addrCheckTimeout || s.discovery.PoolCount() < s.AttemptConnPeers {
|
||||
if addrCheckTimeout || s.discovery.PoolCount()+peerN < s.AttemptConnPeers {
|
||||
s.broadcastHPMessage(NewMessage(CMDGetAddr, payload.NewNullPayload()))
|
||||
addrCheckTimeout = false
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue