mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 11:41:51 +00:00
Add support for loading keypairs from file
This commit is contained in:
@@ -10,6 +10,7 @@ use state_processing::{
|
||||
update_latest_slashed_balances,
|
||||
},
|
||||
};
|
||||
use std::path::Path;
|
||||
use types::test_utils::TestingBeaconStateBuilder;
|
||||
use types::{validator_registry::get_active_validator_indices, *};
|
||||
|
||||
@@ -17,10 +18,14 @@ pub const BENCHING_SAMPLE_SIZE: usize = 10;
|
||||
pub const SMALL_BENCHING_SAMPLE_SIZE: usize = 10;
|
||||
|
||||
/// Run the benchmarking suite on a foundation spec with 16,384 validators.
|
||||
pub fn bench_epoch_processing_n_validators(c: &mut Criterion, validator_count: usize) {
|
||||
pub fn bench_epoch_processing_n_validators(
|
||||
c: &mut Criterion,
|
||||
validator_count: usize,
|
||||
keypair_file: Option<&Path>,
|
||||
) {
|
||||
let spec = ChainSpec::foundation();
|
||||
|
||||
let mut builder = TestingBeaconStateBuilder::new(validator_count, &spec);
|
||||
let mut builder = TestingBeaconStateBuilder::new(validator_count, keypair_file, &spec);
|
||||
|
||||
// Set the state to be just before an epoch transition.
|
||||
let target_slot = (spec.genesis_epoch + 4).end_slot(spec.slots_per_epoch);
|
||||
|
||||
Reference in New Issue
Block a user