-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix `cargo test` and add check to CI (#990) * Relocate ABCI test to fix broken doctest Signed-off-by: Thane Thomson <connect@thanethomson.com> * Use tokio_test for mock client doctest Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add CI test for default features Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add `block_search` RPC endpoint (#991) * Add block_search RPC endpoint and tests * Add .changelog entry * Fix comments * tools: Fix `block_search` endpoint integration tests (#999) Closes #998 * Bump integration test tendermint to v0.34.13 * Fix kvstore integration tests * Bump tendermint version to v0.34.13 in CI Signed-off-by: Thane Thomson <connect@thanethomson.com> * ci: Build and check tools (#997) So far only the kvstore tests ran as part of the Github workfows. This would leave opportunity for changes to introduce breakage to the builds of the tools. In this change the same build and clippy stages are introduced for the tools workspace that currently run for the top-level one. Signed-off-by: xla <self@xla.is> * 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 <connect@thanethomson.com> Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com> Co-authored-by: xla <a.simmerl@gmail.com>
- Loading branch information
1 parent
ddd7d40
commit 540e37f
Showing
22 changed files
with
360 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- `[tendermint-rpc]` Add support for the `/block_search` RPC endpoint. See | ||
<https://docs.tendermint.com/master/rpc/\#/Info/block_search> for details | ||
([#832](https://github.com/informalsystems/tendermint-rs/issues/832)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
//! `/block_search` endpoint JSON-RPC wrapper | ||
pub use super::{block, block_results}; | ||
|
||
use crate::{Method, Order}; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
/// Request for searching for blocks by their BeginBlock and EndBlock events. | ||
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)] | ||
pub struct Request { | ||
pub query: String, | ||
#[serde(with = "tendermint_proto::serializers::from_str")] | ||
pub page: u32, | ||
#[serde(with = "tendermint_proto::serializers::from_str")] | ||
pub per_page: u8, | ||
pub order_by: Order, | ||
} | ||
|
||
impl Request { | ||
/// Constructor. | ||
pub fn new(query: impl ToString, page: u32, per_page: u8, order_by: Order) -> Self { | ||
Self { | ||
query: query.to_string(), | ||
page, | ||
per_page, | ||
order_by, | ||
} | ||
} | ||
} | ||
|
||
impl crate::Request for Request { | ||
type Response = Response; | ||
|
||
fn method(&self) -> Method { | ||
Method::BlockSearch | ||
} | ||
} | ||
|
||
impl crate::SimpleRequest for Request {} | ||
|
||
#[derive(Clone, Debug, Deserialize, Serialize)] | ||
pub struct Response { | ||
pub blocks: Vec<block::Response>, | ||
#[serde(with = "tendermint_proto::serializers::from_str")] | ||
pub total_count: u32, | ||
} | ||
|
||
impl crate::Response for Response {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.