Use par_iter for keypair generation

This commit is contained in:
Paul Hauner
2019-11-22 15:43:43 +11:00
parent 49df77d850
commit 1055fd6752
2 changed files with 3 additions and 1 deletions

View File

@@ -22,3 +22,4 @@ eth2_ssz = { path = "../eth2/utils/ssz" }
eth2_ssz_derive = { path = "../eth2/utils/ssz_derive" }
hex = "0.4"
validator_client = { path = "../validator_client" }
rayon = "1.2.0"

View File

@@ -2,6 +2,7 @@ mod cli;
use clap::ArgMatches;
use environment::RuntimeContext;
use rayon::prelude::*;
use slog::{crit, info};
use std::fs;
use std::path::PathBuf;
@@ -128,7 +129,7 @@ fn make_validators(
spec: ChainSpec,
) -> Result<Vec<ValidatorDirectory>, String> {
methods
.iter()
.par_iter()
.map(|method| {
let mut builder = ValidatorDirectoryBuilder::default()
.spec(spec.clone())