Revert "Sync: Dont ban block roots for context.DeadlineExceeded" (#7017)

* Revert "Sync: Dont ban block roots for context.DeadlineExceeded (#7016)"

This reverts commit a4bbd82a45.
* Merge refs/heads/master into revert-7016-dont-ban-ctx-deadline
This commit is contained in:
Preston Van Loon 2020-08-16 18:18:38 -07:00 committed by GitHub
parent 715cd40f56
commit c3725d11f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -131,9 +131,7 @@ func (s *Service) processPendingBlocks(ctx context.Context) error {
if err := s.chain.ReceiveBlock(ctx, b, blkRoot); err != nil {
log.Debugf("Could not process block from slot %d: %v", b.Block.Slot, err)
if err != context.DeadlineExceeded {
s.setBadBlock(blkRoot)
}
s.setBadBlock(blkRoot)
traceutil.AnnotateError(span, err)
}

View File

@ -32,9 +32,7 @@ func (s *Service) beaconBlockSubscriber(ctx context.Context, msg proto.Message)
if err := s.chain.ReceiveBlock(ctx, signed, root); err != nil {
interop.WriteBlockToDisk(signed, true /*failed*/)
if err != context.DeadlineExceeded {
s.setBadBlock(root)
}
s.setBadBlock(root)
return err
}