From 2a89abe4328f3e96d64a56e6719afebe8dd0ecd6 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Wed, 28 Sep 2022 11:46:48 +0300 Subject: [PATCH] abci: Restore Client::set_option as deprecated --- .../1203-deprecate-abci-client-set-option.md | 2 ++ abci/src/client.rs | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 .changelog/unreleased/enhancements/1203-deprecate-abci-client-set-option.md diff --git a/.changelog/unreleased/enhancements/1203-deprecate-abci-client-set-option.md b/.changelog/unreleased/enhancements/1203-deprecate-abci-client-set-option.md new file mode 100644 index 000000000..7b5a0dc3b --- /dev/null +++ b/.changelog/unreleased/enhancements/1203-deprecate-abci-client-set-option.md @@ -0,0 +1,2 @@ +- `[tendermint-abci]` Deprecate `Client::set_option`. + ([#1203](https://github.com/informalsystems/tendermint-rs/pull/1203)) diff --git a/abci/src/client.rs b/abci/src/client.rs index a7a82be44..2aada34fc 100644 --- a/abci/src/client.rs +++ b/abci/src/client.rs @@ -6,10 +6,10 @@ use tendermint_proto::abci::{ request, response, Request, RequestApplySnapshotChunk, RequestBeginBlock, RequestCheckTx, RequestCommit, RequestDeliverTx, RequestEcho, RequestEndBlock, RequestFlush, RequestInfo, RequestInitChain, RequestListSnapshots, RequestLoadSnapshotChunk, RequestOfferSnapshot, - RequestQuery, ResponseApplySnapshotChunk, ResponseBeginBlock, ResponseCheckTx, ResponseCommit, - ResponseDeliverTx, ResponseEcho, ResponseEndBlock, ResponseFlush, ResponseInfo, - ResponseInitChain, ResponseListSnapshots, ResponseLoadSnapshotChunk, ResponseOfferSnapshot, - ResponseQuery, + RequestQuery, RequestSetOption, ResponseApplySnapshotChunk, ResponseBeginBlock, + ResponseCheckTx, ResponseCommit, ResponseDeliverTx, ResponseEcho, ResponseEndBlock, + ResponseFlush, ResponseInfo, ResponseInitChain, ResponseListSnapshots, + ResponseLoadSnapshotChunk, ResponseOfferSnapshot, ResponseQuery, ResponseSetOption, }; use crate::{codec::ClientCodec, Error}; @@ -113,6 +113,15 @@ impl Client { perform!(self, Commit, RequestCommit {}) } + /// Request that the application set an option to a particular value. + /// + /// This request lacks specification and should not be used. + /// It will be removed in ABCI 0.37. + #[deprecated] + pub fn set_option(&mut self, req: RequestSetOption) -> Result { + perform!(self, SetOption, req) + } + /// Used during state sync to discover available snapshots on peers. pub fn list_snapshots(&mut self) -> Result { perform!(self, ListSnapshots, RequestListSnapshots {})