Browse Source

separate reinstatement of peers from discovery of new peers

pull/4548/head
Callum Michael Waters 5 years ago
parent
commit
e18636ef1f
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      p2p/pex/pex_reactor.go

+ 5
- 1
p2p/pex/pex_reactor.go View File

@ -494,8 +494,12 @@ func (r *Reactor) ensurePeers() {
}
if r.book.NeedMoreAddrs() {
// 0) Check if banned nodes can be reinstated
// Check if banned nodes can be reinstated
r.book.ReinstateBadPeers()
}
if r.book.NeedMoreAddrs() {
// 1) Pick a random peer and ask for more.
peers := r.Switch.Peers().List()
peersCount := len(peers)


Loading…
Cancel
Save