prysm
prysm copied to clipboard
IsAggregated should stop earlier
To check if an attestation is aggregated we loop and count all set bits. We should simply stop if there's more than 1 bit set.
func IsAggregated(attestation *ethpb.Attestation) bool {
return attestation.AggregationBits.Count() > 1
}