Anton Kaliaev 7 years ago
parent
commit
1585152341
1 changed files with 3 additions and 10 deletions
  1. +3
    -10
      p2p/pex/pex_reactor.go

+ 3
- 10
p2p/pex/pex_reactor.go View File

@ -564,16 +564,9 @@ func (r *PEXReactor) crawlPeers() {
r.book.MarkAttempt(pi.Addr)
continue
}
}
// Crawl the connected peers asking for more addresses
for _, pi := range peerInfos {
// We will wait a minimum period of time before crawling peers again
if now.Sub(pi.LastAttempt) >= defaultCrawlPeerInterval {
peer := r.Switch.Peers().Get(pi.Addr.ID)
if peer != nil {
r.RequestAddrs(peer)
}
}
// Ask for more addresses
peer := r.Switch.Peers().Get(pi.Addr.ID)
r.RequestAddrs(peer)
}
}


Loading…
Cancel
Save