Rpc -> proper optimistic confirmation (#12514)

* Add service to track the most recent optimistically confirmed bank

* Plumb service into ClusterInfoVoteListener and ReplayStage

* Clean up test

* Use OptimisticallyConfirmedBank in RPC

* Remove superfluous notifications from RpcSubscriptions

* Use crossbeam to avoid mpsc recv_timeout panic

* Review comments

* Remove superfluous last_checked_slots, but pass in OptimisticallyConfirmedBank for complete correctness
This commit is contained in:
Tyera Eulberg
2020-09-28 20:43:05 -06:00
committed by GitHub
parent 06f84c65f1
commit 89621adca7
14 changed files with 684 additions and 150 deletions

View File

@@ -104,8 +104,8 @@ impl BlockCommitmentCache {
}
pub fn highest_gossip_confirmed_slot(&self) -> Slot {
// TODO: see solana_core::RpcSubscriptions:
//self.last_checked_slots.get(&CommitmentLevel::SingleGossip).unwrap_or(&0)
// TODO: combine bank caches
// Currently, this information is provided by OptimisticallyConfirmedBank::bank.slot()
self.highest_confirmed_slot()
}