mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +00:00
Use par_iter for keypair generation
This commit is contained in:
@@ -22,3 +22,4 @@ eth2_ssz = { path = "../eth2/utils/ssz" }
|
|||||||
eth2_ssz_derive = { path = "../eth2/utils/ssz_derive" }
|
eth2_ssz_derive = { path = "../eth2/utils/ssz_derive" }
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
validator_client = { path = "../validator_client" }
|
validator_client = { path = "../validator_client" }
|
||||||
|
rayon = "1.2.0"
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ mod cli;
|
|||||||
|
|
||||||
use clap::ArgMatches;
|
use clap::ArgMatches;
|
||||||
use environment::RuntimeContext;
|
use environment::RuntimeContext;
|
||||||
|
use rayon::prelude::*;
|
||||||
use slog::{crit, info};
|
use slog::{crit, info};
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
@@ -128,7 +129,7 @@ fn make_validators(
|
|||||||
spec: ChainSpec,
|
spec: ChainSpec,
|
||||||
) -> Result<Vec<ValidatorDirectory>, String> {
|
) -> Result<Vec<ValidatorDirectory>, String> {
|
||||||
methods
|
methods
|
||||||
.iter()
|
.par_iter()
|
||||||
.map(|method| {
|
.map(|method| {
|
||||||
let mut builder = ValidatorDirectoryBuilder::default()
|
let mut builder = ValidatorDirectoryBuilder::default()
|
||||||
.spec(spec.clone())
|
.spec(spec.clone())
|
||||||
|
|||||||
Reference in New Issue
Block a user