mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-19 21:04:41 +00:00
Allow test_harness to load validators from file
Also adds a command to test_harness binary to generate validators
This commit is contained in:
@@ -6,6 +6,7 @@ use beacon_chain::CheckPoint;
|
||||
use bls::{create_proof_of_possession, get_withdrawal_credentials};
|
||||
use log::{info, warn};
|
||||
use ssz::SignedRoot;
|
||||
use std::path::Path;
|
||||
use types::*;
|
||||
|
||||
use types::{
|
||||
@@ -70,7 +71,7 @@ impl TestCase {
|
||||
|
||||
/// Executes the test case, returning an `ExecutionResult`.
|
||||
#[allow(clippy::cyclomatic_complexity)]
|
||||
pub fn execute(&self) -> ExecutionResult {
|
||||
pub fn execute(&self, validators_dir: Option<&Path>) -> ExecutionResult {
|
||||
let spec = self.spec();
|
||||
let validator_count = self.config.deposits_for_chain_start;
|
||||
let slots = self.config.num_slots;
|
||||
@@ -80,7 +81,7 @@ impl TestCase {
|
||||
validator_count
|
||||
);
|
||||
|
||||
let mut harness = BeaconChainHarness::new(spec, validator_count);
|
||||
let mut harness = BeaconChainHarness::new(spec, validator_count, validators_dir);
|
||||
|
||||
info!("Starting simulation across {} slots...", slots);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user