mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-08 00:34:37 +00:00
6f7652d330
`data.target.epoch` is used to count the active validator set. Because `get_committee_count_per_slot` is extremely inefficient the way the spec is written, clients cache it, or the underlying active validator set. Performing the checks in the given order leads to a (very unlikely) security issue where the a cold and above all, distant value may get used which may be costly - reordering the checks brings the value into a more reasonable range before using it.