Expose stake delegations from bank for winner tool (#7354)

* Expose stake delegations from bank

* cargo fmt

* Add test
This commit is contained in:
Justin Starry
2019-12-08 20:52:01 -08:00
committed by GitHub
parent 32d6d811c5
commit 43e608af47
2 changed files with 63 additions and 1 deletions

View File

@@ -178,6 +178,10 @@ impl Stakes {
&self.vote_accounts
}
pub fn stake_delegations(&self) -> &HashMap<Pubkey, Delegation> {
&self.stake_delegations
}
pub fn highest_staked_node(&self) -> Option<Pubkey> {
self.vote_accounts
.iter()