From 72398480e08356c5a4dc1c276628a7a60229bc87 Mon Sep 17 00:00:00 2001 From: Thane Thomson Date: Fri, 1 Oct 2021 02:12:05 -0400 Subject: [PATCH] tools: Add `block_search` method to RPC probe (#1002) * Add missing block_search endpoint * Bump tendermint version to v0.34.13 Signed-off-by: Thane Thomson --- tools/rpc-probe/Makefile.toml | 2 +- tools/rpc-probe/src/kvstore.rs | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/rpc-probe/Makefile.toml b/tools/rpc-probe/Makefile.toml index 1b21fabc1..ee1f5a6d4 100644 --- a/tools/rpc-probe/Makefile.toml +++ b/tools/rpc-probe/Makefile.toml @@ -1,6 +1,6 @@ [env] CONTAINER_NAME = "kvstore-rpc-probe" -DOCKER_IMAGE = "informaldev/tendermint:0.34.9" +DOCKER_IMAGE = "informaldev/tendermint:0.34.13" HOST_RPC_PORT = 26657 CARGO_MAKE_WAIT_MILLISECONDS = 3500 diff --git a/tools/rpc-probe/src/kvstore.rs b/tools/rpc-probe/src/kvstore.rs index cdc534170..a5f4b0eaf 100644 --- a/tools/rpc-probe/src/kvstore.rs +++ b/tools/rpc-probe/src/kvstore.rs @@ -30,6 +30,19 @@ pub fn block(height: u64) -> PlannedInteraction { .into() } +pub fn block_search(query: &str, page: u32, per_page: u32, order_by: &str) -> PlannedInteraction { + Request::new( + "block_search", + json!({ + "query": query, + "page": format!("{}", page), + "per_page": format!("{}", per_page), + "order_by": order_by, + }), + ) + .into() +} + pub fn block_results(height: u64) -> PlannedInteraction { Request::new( "block_results",