mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 03:31:45 +00:00
Disable use of system time in tests
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
use beacon_chain::{
|
||||
test_utils::{
|
||||
BeaconChainHarness, BoxedMutator, Builder,
|
||||
EphemeralTestingSlotClockHarnessType as HarnessType,
|
||||
},
|
||||
test_utils::{BeaconChainHarness, BoxedMutator, Builder, EphemeralHarnessType},
|
||||
BeaconChain, BeaconChainTypes,
|
||||
};
|
||||
use directory::DEFAULT_ROOT_DIR;
|
||||
@@ -41,7 +38,7 @@ pub const EXTERNAL_ADDR: &str = "/ip4/0.0.0.0/tcp/9000";
|
||||
|
||||
/// HTTP API tester that allows interaction with the underlying beacon chain harness.
|
||||
pub struct InteractiveTester<E: EthSpec> {
|
||||
pub harness: BeaconChainHarness<HarnessType<E>>,
|
||||
pub harness: BeaconChainHarness<EphemeralHarnessType<E>>,
|
||||
pub client: BeaconNodeHttpClient,
|
||||
pub network_rx: NetworkReceivers<E>,
|
||||
_server_shutdown: oneshot::Sender<()>,
|
||||
@@ -59,7 +56,7 @@ pub struct ApiServer<E: EthSpec, SFut: Future<Output = ()>> {
|
||||
pub external_peer_id: PeerId,
|
||||
}
|
||||
|
||||
type HarnessBuilder<E> = Builder<HarnessType<E>, TestingSlotClock>;
|
||||
type HarnessBuilder<E> = Builder<EphemeralHarnessType<E>, TestingSlotClock>;
|
||||
type Initializer<E> = Box<dyn FnOnce(HarnessBuilder<E>) -> HarnessBuilder<E>>;
|
||||
type Mutator<E> = BoxedMutator<E, MemoryStore<E>, MemoryStore<E>, TestingSlotClock>;
|
||||
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
use crate::common::{create_api_server, create_api_server_on_port, ApiServer};
|
||||
use beacon_chain::test_utils::RelativeSyncCommittee;
|
||||
use beacon_chain::{
|
||||
test_utils::{
|
||||
AttestationStrategy, BeaconChainHarness, BlockStrategy,
|
||||
EphemeralTestingSlotClockHarnessType,
|
||||
},
|
||||
test_utils::{AttestationStrategy, BeaconChainHarness, BlockStrategy, EphemeralHarnessType},
|
||||
BeaconChain, StateSkipConfig, WhenSlotSkipped, MAXIMUM_GOSSIP_CLOCK_DISPARITY,
|
||||
};
|
||||
use environment::null_logger;
|
||||
@@ -60,8 +57,8 @@ const SKIPPED_SLOTS: &[u64] = &[
|
||||
];
|
||||
|
||||
struct ApiTester {
|
||||
harness: Arc<BeaconChainHarness<EphemeralTestingSlotClockHarnessType<E>>>,
|
||||
chain: Arc<BeaconChain<EphemeralTestingSlotClockHarnessType<E>>>,
|
||||
harness: Arc<BeaconChainHarness<EphemeralHarnessType<E>>>,
|
||||
chain: Arc<BeaconChain<EphemeralHarnessType<E>>>,
|
||||
client: BeaconNodeHttpClient,
|
||||
next_block: SignedBeaconBlock<E>,
|
||||
reorg_block: SignedBeaconBlock<E>,
|
||||
|
||||
Reference in New Issue
Block a user