Skip to content

Commit

Permalink
fix context deadline rejections (#13716)
Browse files Browse the repository at this point in the history
  • Loading branch information
nisdas authored Mar 11, 2024
1 parent 800f3b5 commit cb8eb4e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions beacon-chain/sync/subscriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,11 @@ func (s *Service) wrapAndReportValidation(topic string, v wrappedVal) (string, p
return pubsub.ValidationIgnore
}
b, err := v(ctx, pid, msg)
// We do not penalize peers if we are hitting pubsub timeouts
// trying to process those messages.
if b == pubsub.ValidationReject && ctx.Err() != nil {
b = pubsub.ValidationIgnore
}
if b == pubsub.ValidationReject {
fields := logrus.Fields{
"topic": topic,
Expand Down

0 comments on commit cb8eb4e

Please sign in to comment.