diff --git a/.changelog/unreleased/bug-fixes/1326-compat-for-latest_block_results.md b/.changelog/unreleased/bug-fixes/1326-compat-for-latest_block_results.md new file mode 100644 index 000000000..804ba45b8 --- /dev/null +++ b/.changelog/unreleased/bug-fixes/1326-compat-for-latest_block_results.md @@ -0,0 +1,3 @@ +- [tendermint-rpc]` Use compatibility mode in implementations + of the `Client::latest_block_results` method + ([\#1326](https://github.com/informalsystems/tendermint-rs/pull/1326)) diff --git a/rpc/src/client/transport/http.rs b/rpc/src/client/transport/http.rs index 2c89d4163..ceaa427cd 100644 --- a/rpc/src/client/transport/http.rs +++ b/rpc/src/client/transport/http.rs @@ -181,6 +181,10 @@ impl Client for HttpClient { perform_with_compat!(self, endpoint::block_results::Request::new(height.into())) } + async fn latest_block_results(&self) -> Result { + perform_with_compat!(self, endpoint::block_results::Request::default()) + } + async fn header(&self, height: H) -> Result where H: Into + Send, diff --git a/rpc/src/client/transport/websocket.rs b/rpc/src/client/transport/websocket.rs index 0c1a710e6..c28ab14f7 100644 --- a/rpc/src/client/transport/websocket.rs +++ b/rpc/src/client/transport/websocket.rs @@ -244,6 +244,10 @@ impl Client for WebSocketClient { perform_with_compat!(self, endpoint::block_results::Request::new(height.into())) } + async fn latest_block_results(&self) -> Result { + perform_with_compat!(self, endpoint::block_results::Request::default()) + } + async fn header(&self, height: H) -> Result where H: Into + Send,