Set BeaconState to process deposits in parallel

Provides a large speed improvement.
This commit is contained in:
Paul Hauner 2019-02-28 23:09:21 +11:00
parent ed032dddea
commit 7108d057fb
No known key found for this signature in database
GPG Key ID: D362883A9218FCC6

View File

@ -9,6 +9,7 @@ use bls::verify_proof_of_possession;
use honey_badger_split::SplitExt;
use log::{debug, error, trace};
use rand::RngCore;
use rayon::prelude::*;
use serde_derive::Serialize;
use ssz::{hash, Decodable, DecodeError, Encodable, SszStream, TreeHash};
use std::collections::HashMap;
@ -202,7 +203,7 @@ impl BeaconState {
trace!("Processing genesis deposits...");
let deposit_data = initial_validator_deposits
.iter()
.par_iter()
.map(|deposit| &deposit.deposit_data)
.collect();