Skip to content

Commit

Permalink
Merge pull request #502 from hkalina/jkalina/remove-duplicated-peers-…
Browse files Browse the repository at this point in the history
…cond

Remove duplicated condition for useless peers
  • Loading branch information
uprendis authored Aug 17, 2023
2 parents 9ba8424 + 5f1d5af commit 71882c8
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions gossip/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -788,10 +788,6 @@ func (h *handler) handle(p *peer) error {
useless = true
discfilter.Ban(p.ID())
}
if !p.Peer.Info().Network.Trusted && useless && h.peers.UselessNum() >= h.maxPeers/10 {
// don't allow more than 10% of useless peers
return p2p.DiscTooManyPeers
}
if !p.Peer.Info().Network.Trusted && useless {
if h.peers.UselessNum() >= h.maxPeers/10 {
// don't allow more than 10% of useless peers
Expand Down

0 comments on commit 71882c8

Please sign in to comment.