Skip to content

Commit

Permalink
config: remove no-headers as it may leads to a dead peer not removing
Browse files Browse the repository at this point in the history
  • Loading branch information
krish-nr committed Jan 30, 2024
1 parent 5a43edc commit d0193f8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions eth/protocols/eth/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,16 @@ func Handle(backend Backend, peer *Peer) error {
for {
err := handleMessage(backend, peer)
switch {
// TODO: currently no headers not ignored as it may leads to a dead peer not removing as expected
/*
case errors.Is(err, etherror.ErrNoHeadersDelivered):
// ignore no headers delivered
peer.Log().Warn("Message handling failed with no headers")
*/
case errors.Is(err, etherror.ErrInvalidHeaderBatchAnchor):
// ignore invalid header anchor
peer.Log().Warn("Message handling failed with invalid batch request anchor")
case errors.Is(err, etherror.ErrNoHeadersDelivered):
// ignore no headers delivered
peer.Log().Warn("Message handling failed with no headers")

case err != nil:
peer.Log().Debug("Message handling failed in `eth`", "err", err)
return err
Expand Down

0 comments on commit d0193f8

Please sign in to comment.