Skip to content

Commit

Permalink
Do not add old nodes. (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
dajohi authored Feb 16, 2024
1 parent dc1a9e7 commit 7308a71
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions decred.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ func (c *crawler) testPeer(ctx context.Context, ip netip.AddrPort) {
// Wait for the verack message or timeout in case of failure.
select {
case <-verack:
if p.ProtocolVersion() < wire.RemoveRejectVersion {
return
}
// Mark this peer as a good node.
c.amgr.Good(ip, p.Services(), p.ProtocolVersion())

Expand Down

0 comments on commit 7308a71

Please sign in to comment.