prysm icon indicating copy to clipboard operation
prysm copied to clipboard

IsAggregated should stop earlier

Open potuz opened this issue 1 year ago • 0 comments

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
}

potuz avatar Mar 28 '24 13:03 potuz