Add VoteTracker for tracking cluster's votes in gossip (#8327)

Track votes by slot in cluster_vote_listener
This commit is contained in:
carllin
2020-03-09 22:03:09 -07:00
committed by GitHub
parent ae8badb141
commit 9872430bd2
8 changed files with 1003 additions and 23 deletions

View File

@ -122,6 +122,10 @@ impl BankForks {
self.banks.get(&bank_slot)
}
pub fn root_bank(&self) -> &Arc<Bank> {
self.banks.get(&self.root()).expect("Root bank must exist")
}
pub fn new_from_banks(initial_forks: &[Arc<Bank>], rooted_path: Vec<Slot>) -> Self {
let mut banks = HashMap::new();
let working_bank = initial_forks[0].clone();