Skip to content

Commit

Permalink
add cheap check
Browse files Browse the repository at this point in the history
  • Loading branch information
nisdas committed Aug 13, 2020
1 parent 98f67d4 commit b4a21ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beacon-chain/core/blocks/attestation.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func VerifyAttestations(ctx context.Context, beaconState *stateTrie.BeaconState,
// VerifyAttestation converts and attestation into an indexed attestation and verifies
// the signature in that attestation.
func VerifyAttestation(ctx context.Context, beaconState *stateTrie.BeaconState, att *ethpb.Attestation) error {
if att == nil || att.Data == nil {
if att == nil || att.Data == nil || att.AggregationBits.Count() == 0 {
return fmt.Errorf("nil or missing attestation data: %v", att)
}
committee, err := helpers.BeaconCommitteeFromState(beaconState, att.Data.Slot, att.Data.CommitteeIndex)
Expand Down

0 comments on commit b4a21ae

Please sign in to comment.