Cleanup staking utils to divide functionality between delegate and normal node utitliites. Also replaces vote_states() with more generalized vote_accounts() in Bank. (#3070)

This commit is contained in:
carllin
2019-03-03 18:04:13 -08:00
committed by GitHub
parent 1654199b23
commit de1d7ce312
6 changed files with 153 additions and 162 deletions

View File

@@ -877,9 +877,9 @@ impl ClusterInfo {
loop {
let start = timestamp();
let stakes: HashMap<_, _> = match bank_forks {
Some(ref bank_forks) => {
staking_utils::node_stakes(&bank_forks.read().unwrap().working_bank())
}
Some(ref bank_forks) => staking_utils::delegated_stakes(
&bank_forks.read().unwrap().working_bank(),
),
None => HashMap::new(),
};
let _ = Self::run_gossip(&obj, &stakes, &blob_sender);