add get_epoch_vote_accounts rpc (#4317)

* add get_epoch_vote_accounts rpc

* fixups

* documentation and type updates
This commit is contained in:
Rob Walker
2019-05-20 22:21:13 -07:00
committed by GitHub
parent 1acfcf3acf
commit ead15d294e
6 changed files with 123 additions and 100 deletions

View File

@@ -1,7 +1,6 @@
//! The `pubsub` module implements a threaded subscription service on client RPC request
use crate::bank_forks::BankForks;
use bs58;
use core::hash::Hash;
use jsonrpc_core::futures::Future;
use jsonrpc_pubsub::typed::Sink;
@@ -144,7 +143,7 @@ where
fn notify_program(accounts: Vec<(Pubkey, Account)>, sink: &Sink<(String, Account)>, _root: u64) {
for (pubkey, account) in accounts.iter() {
sink.notify(Ok((bs58::encode(pubkey).into_string(), account.clone())))
sink.notify(Ok((pubkey.to_string(), account.clone())))
.wait()
.unwrap();
}