Add SingleGossip commitment level to use for subscriptions (#10147)

automerge
This commit is contained in:
Tyera Eulberg
2020-05-22 13:55:17 -06:00
committed by GitHub
parent 2324eb9ff9
commit 2928c5d103
3 changed files with 316 additions and 52 deletions

View File

@@ -92,7 +92,10 @@ impl JsonRpcRequestProcessor {
debug!("RPC using node root: {:?}", slot);
Ok(r_bank_forks.get(slot).cloned().unwrap())
}
Some(commitment_config) if commitment_config.commitment == CommitmentLevel::Single => {
Some(commitment_config)
if commitment_config.commitment == CommitmentLevel::Single
|| commitment_config.commitment == CommitmentLevel::SingleGossip =>
{
let slot = self
.block_commitment_cache
.read()