mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2025-01-04 18:14:30 +00:00
Set BeaconState
to process deposits in parallel
Provides a large speed improvement.
This commit is contained in:
parent
ed032dddea
commit
7108d057fb
@ -9,6 +9,7 @@ use bls::verify_proof_of_possession;
|
|||||||
use honey_badger_split::SplitExt;
|
use honey_badger_split::SplitExt;
|
||||||
use log::{debug, error, trace};
|
use log::{debug, error, trace};
|
||||||
use rand::RngCore;
|
use rand::RngCore;
|
||||||
|
use rayon::prelude::*;
|
||||||
use serde_derive::Serialize;
|
use serde_derive::Serialize;
|
||||||
use ssz::{hash, Decodable, DecodeError, Encodable, SszStream, TreeHash};
|
use ssz::{hash, Decodable, DecodeError, Encodable, SszStream, TreeHash};
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
@ -202,7 +203,7 @@ impl BeaconState {
|
|||||||
trace!("Processing genesis deposits...");
|
trace!("Processing genesis deposits...");
|
||||||
|
|
||||||
let deposit_data = initial_validator_deposits
|
let deposit_data = initial_validator_deposits
|
||||||
.iter()
|
.par_iter()
|
||||||
.map(|deposit| &deposit.deposit_data)
|
.map(|deposit| &deposit.deposit_data)
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user