Initialize BlockCommitmentCache slot and root on node boot (#11178)

* Initialize commitment-cache slot and root on node boot

* Ignore long tests
This commit is contained in:
Tyera Eulberg
2020-07-23 11:44:57 -06:00
committed by GitHub
parent b60ff70657
commit b5a6a2f461
3 changed files with 10 additions and 1 deletions

View File

@ -270,7 +270,9 @@ impl Validator {
}
let cluster_info = Arc::new(ClusterInfo::new(node.info.clone(), keypair.clone()));
let block_commitment_cache = Arc::new(RwLock::new(BlockCommitmentCache::default()));
let mut block_commitment_cache = BlockCommitmentCache::default();
block_commitment_cache.initialize_slots(bank.slot());
let block_commitment_cache = Arc::new(RwLock::new(block_commitment_cache));
let subscriptions = Arc::new(RpcSubscriptions::new(
&exit,