Skip to content

Commit

Permalink
abci: Restore Client::set_option as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
mzabaluev committed Sep 28, 2022
1 parent 35e3fe5 commit 2a89abe
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `[tendermint-abci]` Deprecate `Client::set_option`.
([#1203](https://github.com/informalsystems/tendermint-rs/pull/1203))
17 changes: 13 additions & 4 deletions abci/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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<ResponseSetOption, Error> {
perform!(self, SetOption, req)
}

/// Used during state sync to discover available snapshots on peers.
pub fn list_snapshots(&mut self) -> Result<ResponseListSnapshots, Error> {
perform!(self, ListSnapshots, RequestListSnapshots {})
Expand Down

0 comments on commit 2a89abe

Please sign in to comment.