Expose current stake accounts of a bank for use in cli tooling (#6184)

This commit is contained in:
Justin Starry
2019-09-30 21:57:49 -04:00
committed by GitHub
parent fee97236bf
commit 2f92b92a8a
2 changed files with 10 additions and 0 deletions

View File

@@ -167,10 +167,15 @@ impl Stakes {
}
}
}
pub fn vote_accounts(&self) -> &HashMap<Pubkey, (u64, Account)> {
&self.vote_accounts
}
pub fn stake_accounts(&self) -> &HashMap<Pubkey, Account> {
&self.stake_accounts
}
pub fn rewards_pools(&self) -> impl Iterator<Item = (&Pubkey, &Account)> {
self.stake_accounts
.iter()