Disable use of system time in tests

This commit is contained in:
Emilia Hane
2023-02-14 13:33:38 +01:00
parent 148385eb70
commit 73c7ad73b8
29 changed files with 485 additions and 559 deletions

View File

@@ -1,8 +1,6 @@
#![cfg(test)]
use crate::test_utils::*;
use beacon_chain::test_utils::{
BeaconChainHarness, EphemeralTestingSlotClockHarnessType as HarnessType,
};
use beacon_chain::test_utils::{BeaconChainHarness, EphemeralHarnessType};
use beacon_chain::types::*;
use swap_or_not_shuffle::shuffle_list;
@@ -13,7 +11,7 @@ lazy_static! {
static ref KEYPAIRS: Vec<Keypair> = generate_deterministic_keypairs(VALIDATOR_COUNT);
}
fn get_harness<E: EthSpec>(validator_count: usize) -> BeaconChainHarness<HarnessType<E>> {
fn get_harness<E: EthSpec>(validator_count: usize) -> BeaconChainHarness<EphemeralHarnessType<E>> {
let harness = BeaconChainHarness::builder(E::default())
.default_spec()
.keypairs(KEYPAIRS[0..validator_count].to_vec())

View File

@@ -2,8 +2,8 @@
use crate::test_utils::*;
use crate::test_utils::{SeedableRng, XorShiftRng};
use beacon_chain::test_utils::{
interop_genesis_state_with_eth1, test_spec, BeaconChainHarness,
EphemeralTestingSlotClockHarnessType as HarnessType, DEFAULT_ETH1_BLOCK_HASH,
interop_genesis_state_with_eth1, test_spec, BeaconChainHarness, EphemeralHarnessType,
DEFAULT_ETH1_BLOCK_HASH,
};
use beacon_chain::types::{
test_utils::TestRandom, BeaconState, BeaconStateAltair, BeaconStateBase, BeaconStateError,
@@ -28,7 +28,7 @@ lazy_static! {
async fn get_harness<E: EthSpec>(
validator_count: usize,
slot: Slot,
) -> BeaconChainHarness<HarnessType<E>> {
) -> BeaconChainHarness<EphemeralHarnessType<E>> {
let harness = BeaconChainHarness::builder(E::default())
.default_spec()
.keypairs(KEYPAIRS[0..validator_count].to_vec())