diff --git a/beacon_node/beacon_chain/test_harness/src/beacon_chain_harness.rs b/beacon_node/beacon_chain/test_harness/src/beacon_chain_harness.rs index 28723a203..d74464ad4 100644 --- a/beacon_node/beacon_chain/test_harness/src/beacon_chain_harness.rs +++ b/beacon_node/beacon_chain/test_harness/src/beacon_chain_harness.rs @@ -12,14 +12,9 @@ use slot_clock::TestingSlotClock; use ssz::TreeHash; use std::collections::HashSet; use std::iter::FromIterator; -use std::path::Path; use std::sync::Arc; use types::{test_utils::TestingBeaconStateBuilder, *}; -mod generate_deposits; - -pub use generate_deposits::generate_deposits_from_keypairs; - /// The beacon chain harness simulates a single beacon node with `validator_count` validators connected /// to it. Each validator is provided a borrow to the beacon chain, where it may read /// information and submit blocks/attestations for processing. diff --git a/beacon_node/beacon_chain/test_harness/src/beacon_chain_harness/generate_deposits.rs b/beacon_node/beacon_chain/test_harness/src/beacon_chain_harness/generate_deposits.rs deleted file mode 100644 index bba3aec1c..000000000 --- a/beacon_node/beacon_chain/test_harness/src/beacon_chain_harness/generate_deposits.rs +++ /dev/null @@ -1,46 +0,0 @@ -use bls::get_withdrawal_credentials; -use log::debug; -use rayon::prelude::*; -use types::*; - -/// Generates a `Deposit` for each keypairs -pub fn generate_deposits_from_keypairs( - keypairs: &[Keypair], - genesis_time: u64, - domain: u64, - spec: &ChainSpec, -) -> Vec { - debug!( - "Generating {} validator deposits from random keypairs...", - keypairs.len() - ); - - let initial_validator_deposits = keypairs - .par_iter() - .map(|keypair| { - let withdrawal_credentials = Hash256::from_slice( - &get_withdrawal_credentials(&keypair.pk, spec.bls_withdrawal_prefix_byte)[..], - ); - Deposit { - branch: vec![], // branch verification is not specified. - index: 0, // index verification is not specified. - deposit_data: DepositData { - amount: 32_000_000_000, // 32 ETH (in Gwei) - timestamp: genesis_time - 1, - deposit_input: DepositInput { - pubkey: keypair.pk.clone(), - // Validator can withdraw using their main keypair. - withdrawal_credentials: withdrawal_credentials.clone(), - proof_of_possession: DepositInput::create_proof_of_possession( - &keypair, - &withdrawal_credentials, - domain, - ), - }, - }, - } - }) - .collect(); - - initial_validator_deposits -} diff --git a/beacon_node/beacon_chain/test_harness/src/test_case.rs b/beacon_node/beacon_chain/test_harness/src/test_case.rs index cee78f6c4..0a6206972 100644 --- a/beacon_node/beacon_chain/test_harness/src/test_case.rs +++ b/beacon_node/beacon_chain/test_harness/src/test_case.rs @@ -6,7 +6,6 @@ use beacon_chain::CheckPoint; use bls::get_withdrawal_credentials; use log::{info, warn}; use ssz::SignedRoot; -use std::path::Path; use types::*; use types::test_utils::{TestingAttesterSlashingBuilder, TestingProposerSlashingBuilder};