Ensure BeaconState epoch tests use distinct seed

This commit is contained in:
Paul Hauner 2019-05-20 11:02:18 +10:00
parent d868d82124
commit 7ea1c4bb12
No known key found for this signature in database
GPG Key ID: 5E2CFF9B75FA63DF

View File

@ -244,6 +244,12 @@ mod committees {
let (mut state, _keypairs): (BeaconState<T>, _) = builder.build();
let distinct_hashes: Vec<Hash256> = (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();