Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p2p: Don't mark peer as bad in connection handler #4575

Merged
merged 1 commit into from Jan 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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