rpc vote_accounts by ecurrent pocch, not stakers epoch (#4651)

This commit is contained in:
Rob Walker 2019-06-11 16:57:47 -07:00 committed by GitHub
parent ca907f37c3
commit 697228a484
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ impl JsonRpcRequestProcessor {
fn get_epoch_vote_accounts(&self) -> Result<Vec<(Pubkey, u64, VoteState)>> {
let bank = self.bank();
Ok(bank
.epoch_vote_accounts(bank.get_stakers_epoch(bank.slot()))
.epoch_vote_accounts(bank.get_epoch_and_slot_index(bank.slot()).0)
.ok_or_else(Error::invalid_request)?
.iter()
.map(|(k, (s, a))| (*k, *s, VoteState::from(a).unwrap_or_default()))