diff --git a/beacon_node/beacon_chain/test_harness/src/test_rig.rs b/beacon_node/beacon_chain/test_harness/src/beacon_chain_harness.rs similarity index 98% rename from beacon_node/beacon_chain/test_harness/src/test_rig.rs rename to beacon_node/beacon_chain/test_harness/src/beacon_chain_harness.rs index f50f10698..01318727b 100644 --- a/beacon_node/beacon_chain/test_harness/src/test_rig.rs +++ b/beacon_node/beacon_chain/test_harness/src/beacon_chain_harness.rs @@ -13,7 +13,7 @@ use std::io::prelude::*; use std::sync::Arc; use types::{BeaconBlock, ChainSpec, Keypair, Validator}; -pub struct TestRig { +pub struct BeaconChainHarness { db: Arc<MemoryDB>, beacon_chain: Arc<BeaconChain<MemoryDB, TestingSlotClock>>, block_store: Arc<BeaconBlockStore<MemoryDB>>, @@ -22,7 +22,7 @@ pub struct TestRig { pub spec: ChainSpec, } -impl TestRig { +impl BeaconChainHarness { pub fn new(mut spec: ChainSpec, validator_count: usize) -> Self { let db = Arc::new(MemoryDB::open()); let block_store = Arc::new(BeaconBlockStore::new(db.clone())); diff --git a/beacon_node/beacon_chain/test_harness/src/lib.rs b/beacon_node/beacon_chain/test_harness/src/lib.rs index aaa4ae2c1..efdc39e1e 100644 --- a/beacon_node/beacon_chain/test_harness/src/lib.rs +++ b/beacon_node/beacon_chain/test_harness/src/lib.rs @@ -1,11 +1,11 @@ +mod beacon_chain_harness; mod benching_beacon_node; mod direct_beacon_node; mod direct_duties; -mod test_rig; mod validator; +pub use self::beacon_chain_harness::BeaconChainHarness; pub use self::benching_beacon_node::BenchingBeaconNode; pub use self::direct_beacon_node::DirectBeaconNode; pub use self::direct_duties::DirectDuties; -pub use self::test_rig::TestRig; pub use self::validator::TestValidator; diff --git a/beacon_node/beacon_chain/test_harness/tests/chain.rs b/beacon_node/beacon_chain/test_harness/tests/chain.rs index 6130f4c5d..19bdf233f 100644 --- a/beacon_node/beacon_chain/test_harness/tests/chain.rs +++ b/beacon_node/beacon_chain/test_harness/tests/chain.rs @@ -1,10 +1,10 @@ -use test_harness::TestRig; +use test_harness::BeaconChainHarness; use types::ChainSpec; #[test] fn it_can_build_on_genesis_block() { let validator_count = 2; - let mut rig = TestRig::new(ChainSpec::foundation(), validator_count); + let mut rig = BeaconChainHarness::new(ChainSpec::foundation(), validator_count); rig.advance_chain_with_block(); } @@ -13,7 +13,7 @@ fn it_can_build_on_genesis_block() { #[ignore] fn it_can_produce_past_first_epoch_boundary() { let validator_count = 2; - let mut rig = TestRig::new(ChainSpec::foundation(), validator_count); + let mut rig = BeaconChainHarness::new(ChainSpec::foundation(), validator_count); let blocks = rig.spec.epoch_length + 1;