Add concurrency to TestBeaconStateBuilder

Specifically to generating the initial validator objects.
This commit is contained in:
Paul Hauner 2019-03-11 18:58:49 +11:00
parent 36085f63e9
commit 5e5cfb782e
No known key found for this signature in database
GPG Key ID: D362883A9218FCC6

View File

@ -23,7 +23,7 @@ impl TestingBeaconStateBuilder {
.collect(); .collect();
let validators = keypairs let validators = keypairs
.iter() .par_iter()
.map(|keypair| { .map(|keypair| {
let withdrawal_credentials = Hash256::from_slice(&get_withdrawal_credentials( let withdrawal_credentials = Hash256::from_slice(&get_withdrawal_credentials(
&keypair.pk, &keypair.pk,