Skip to content

Commit af402bb

Browse files
committed
Add consistency check for ProposerLookaheadSlots
1 parent 5a476d8 commit af402bb

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

consensus/types/src/eth_spec.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,9 +600,14 @@ mod test {
600600
use ssz_types::typenum::Unsigned;
601601

602602
fn assert_valid_spec<E: EthSpec>() {
603+
let spec = E::default_spec();
603604
E::kzg_commitments_tree_depth();
604605
E::block_body_tree_depth();
605606
assert!(E::MaxValidatorsPerSlot::to_i32() >= E::MaxValidatorsPerCommittee::to_i32());
607+
assert_eq!(
608+
E::proposer_lookahead_slots(),
609+
(spec.min_seed_lookahead.as_usize() + 1) * E::slots_per_epoch() as usize
610+
);
606611
}
607612

608613
#[test]

0 commit comments

Comments
 (0)