[][src]Trait abci::Info

pub trait Info: Send + Sync {
    fn info(&self, info_request: InfoRequest) -> InfoResponse;

    fn echo(&self, message: String) -> String { ... }
fn set_option(
        &self,
        _set_option_request: SetOptionRequest
    ) -> Result<SetOptionResponse> { ... }
fn query(&self, _query_request: QueryRequest) -> Result<QueryResponse> { ... } }

Trait for initialization and for queries from the user.

Required methods

fn info(&self, info_request: InfoRequest) -> InfoResponse

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>
Loading content...

Provided methods

fn echo(&self, message: String) -> String

Echo a string to test abci client/server implementation.

fn set_option(
    &self,
    _set_option_request: SetOptionRequest
) -> Result<SetOptionResponse>

Set non-consensus critical application specific options.

fn query(&self, _query_request: QueryRequest) -> Result<QueryResponse>

Query for data from the application at current or past height.

Loading content...

Implementors

Loading content...