Do not send empty block header to slasher in validation (#11071)

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
This commit is contained in:
Denys Yaroshenko 2022-07-26 00:03:48 +03:00 committed by GitHub
parent bfdaf2ec5a
commit 32745b5484
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,6 +84,7 @@ func (s *Service) validateBeaconBlockPubSub(ctx context.Context, pid peer.ID, ms
blockHeader, err := interfaces.SignedBeaconBlockHeaderFromBlockInterface(blk)
if err != nil {
log.WithError(err).WithField("blockSlot", blk.Block().Slot()).Warn("Could not extract block header")
return
}
s.cfg.slasherBlockHeadersFeed.Send(blockHeader)
}()