Skip to content

Commit

Permalink
Add AbciQuery to Method enum
Browse files Browse the repository at this point in the history
  • Loading branch information
amanusk committed Jul 31, 2019
1 parent 02b2fc3 commit 566dfb6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/rpc/endpoint/abci_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl rpc::Request for Request {
type Response = Response;

fn method(&self) -> rpc::Method {
rpc::Method::AbciInfo
rpc::Method::AbciQuery
}
}

Expand Down
5 changes: 5 additions & 0 deletions src/rpc/method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ pub enum Method {
/// Get ABCI info
AbciInfo,

/// Get ABCI query
AbciQuery,

/// Get block info
Block,

Expand Down Expand Up @@ -57,6 +60,7 @@ impl Method {
pub fn as_str(self) -> &'static str {
match self {
Method::AbciInfo => "abci_info",
Method::AbciQuery => "abci_query",
Method::Block => "block",
Method::BlockResults => "block_results",
Method::Blockchain => "blockchain",
Expand All @@ -79,6 +83,7 @@ impl FromStr for Method {
fn from_str(s: &str) -> Result<Self, Error> {
Ok(match s {
"abci_info" => Method::AbciInfo,
"abci_query" => Method::AbciQuery,
"block" => Method::Block,
"block_results" => Method::BlockResults,
"blockchain" => Method::Blockchain,
Expand Down

0 comments on commit 566dfb6

Please sign in to comment.