Fork choice: Ensure lengths are the same before checking overlap (#4663)

* Ensure lengths are the same before checking overlap
This commit is contained in:
Preston Van Loon
2020-01-26 23:18:02 -08:00
committed by prylabs-bulldozer[bot]
parent 127f05d531
commit 4960acb285

View File

@@ -107,7 +107,7 @@ func (s *Service) seen(att *ethpb.Attestation) (bool, error) {
if !ok {
return false, errors.New("not a bit field")
}
if savedBitlist.Overlaps(att.AggregationBits) {
if savedBitlist.Len() == att.AggregationBits.Len() && savedBitlist.Overlaps(att.AggregationBits) {
return true, nil
}
}