From 7ea1c4bb121fbfa26672cf7faf5acdf4aed595b4 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Mon, 20 May 2019 11:02:18 +1000 Subject: [PATCH] Ensure `BeaconState` epoch tests use distinct seed --- eth2/types/src/beacon_state/tests.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eth2/types/src/beacon_state/tests.rs b/eth2/types/src/beacon_state/tests.rs index d6dcddaf6..93391fc2b 100644 --- a/eth2/types/src/beacon_state/tests.rs +++ b/eth2/types/src/beacon_state/tests.rs @@ -244,6 +244,12 @@ mod committees { let (mut state, _keypairs): (BeaconState, _) = builder.build(); + let distinct_hashes: Vec = (0..T::latest_randao_mixes_length()) + .into_iter() + .map(|i| Hash256::from(i as u64)) + .collect(); + state.latest_randao_mixes = FixedLenVec::from(distinct_hashes); + state .build_epoch_cache(RelativeEpoch::Previous, spec) .unwrap();