Limit Rayon threadpool threads (#5871)

This commit is contained in:
Sagar Dhawan
2019-09-12 11:39:39 -07:00
committed by GitHub
parent 385086359c
commit c1d788880d
16 changed files with 73 additions and 30 deletions

View File

@@ -10,6 +10,7 @@ use solana_core::{
service::Service,
validator::{Validator, ValidatorConfig},
};
use solana_rayon_threadlimit::set_thread_count;
use solana_sdk::{
client::SyncClient,
clock::DEFAULT_TICKS_PER_SLOT,
@@ -116,6 +117,8 @@ impl LocalCluster {
}
pub fn new(config: &ClusterConfig) -> Self {
set_thread_count(1);
assert_eq!(config.validator_configs.len(), config.node_stakes.len());
let leader_keypair = Arc::new(Keypair::new());
let leader_pubkey = leader_keypair.pubkey();