pub trait Info {
fn info(&self, info_request: RequestInfo) -> ResponseInfo;
fn echo(&self, echo_request: RequestEcho) -> ResponseEcho { ... }
fn set_option(
&self,
_set_option_request: RequestSetOption
) -> ResponseSetOption { ... }
fn query(&self, _query_request: RequestQuery) -> ResponseQuery { ... }
fn flush(&self, _flush_request: RequestFlush) -> ResponseFlush { ... }
}
Available on crate feature
sync-api
only.Expand description
Trait for initialization and for queries from the user.
Required Methods
sourcefn info(&self, info_request: RequestInfo) -> ResponseInfo
fn info(&self, info_request: RequestInfo) -> ResponseInfo
Return information about the application state.
Crash Recovery
On startup, Tendermint calls the info
method to get the latest committed state of the app. The app
MUST return information consistent with the last block it successfully completed commit
for.
If the app succesfully committed block H
but not H+1
, then
last_block_height = H
last_block_app_hash = <hash returned by Commit for block H>
If the app failed during the commit
of block H
, then
last_block_height = H-1
last_block_app_hash = <hash returned by Commit for block H-1, which is the hash in the header of block H>
Provided Methods
sourcefn echo(&self, echo_request: RequestEcho) -> ResponseEcho
fn echo(&self, echo_request: RequestEcho) -> ResponseEcho
Echo a string to test abci client/server implementation.
sourcefn set_option(&self, _set_option_request: RequestSetOption) -> ResponseSetOption
fn set_option(&self, _set_option_request: RequestSetOption) -> ResponseSetOption
Set non-consensus critical application specific options.
sourcefn query(&self, _query_request: RequestQuery) -> ResponseQuery
fn query(&self, _query_request: RequestQuery) -> ResponseQuery
Query for data from the application at current or past height.
sourcefn flush(&self, _flush_request: RequestFlush) -> ResponseFlush
fn flush(&self, _flush_request: RequestFlush) -> ResponseFlush
Signals that messages queued on the client should be flushed to the server.