Skip to content

Commit

Permalink
make method for retrieving validators in rpc client async too
Browse files Browse the repository at this point in the history
and some minor changes due to rebasing on master
  • Loading branch information
liamsi committed Dec 12, 2019
1 parent b6543c0 commit 904f9aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tendermint/src/rpc/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ impl Client {
}

/// `/validators`: get validators a given height.
pub fn validators<H>(&self, height: H) -> Result<validators::Response, Error>
pub async fn validators<H>(&self, height: H) -> Result<validators::Response, Error>
where
H: Into<Height>,
{
self.perform(validators::Request::new(height.into()))
self.perform(validators::Request::new(height.into())).await
}

/// `/commit`: get the latest block commit
Expand Down
1 change: 1 addition & 0 deletions tendermint/src/validator.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Tendermint validators

use crate::amino_types::message::AminoMessage;
use crate::{account, lite, merkle, vote, Hash, PublicKey};
use serde::{de::Error as _, Deserialize, Deserializer, Serialize, Serializer};
use signatory::{
Expand Down
2 changes: 1 addition & 1 deletion tendermint/tests/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ mod endpoints {
#[test]
fn first_block() {
let response =
endpoint::block::Response::from_json(&read_json_fixture("first_block")).unwrap();
endpoint::block::Response::from_string(&read_json_fixture("first_block")).unwrap();

let tendermint::Block {
header,
Expand Down

0 comments on commit 904f9aa

Please sign in to comment.