Skip to content

Commit

Permalink
Don't mark peer as bad as part of this return. (#4575)
Browse files Browse the repository at this point in the history
  • Loading branch information
prestonvanloon authored and nisdas committed Jan 18, 2020
1 parent ccfc650 commit 68c1ca7
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions beacon-chain/p2p/handshake.go
Expand Up @@ -64,11 +64,6 @@ func (s *Service) AddConnectionHandler(reqFunc func(ctx context.Context, id peer
s.peers.SetConnectionState(conn.RemotePeer(), peers.PeerDisconnected)
return
}
s.peers.IncrementBadResponses(conn.RemotePeer())
badResponses, err := s.peers.BadResponses(conn.RemotePeer())
if err == nil && badResponses == s.peers.MaxBadResponses() {
log.Debug("Peer has given too many bad responses; will ignore in future")
}
s.peers.SetConnectionState(conn.RemotePeer(), peers.PeerDisconnecting)
if err := s.Disconnect(conn.RemotePeer()); err != nil {
log.WithError(err).Error("Unable to disconnect from peer")
Expand Down

0 comments on commit 68c1ca7

Please sign in to comment.