[][src]Trait abci::Info

pub trait Info: Send + Sync {
    fn info<'life0, 'async_trait>(
        &'life0 self,
        info_request: InfoRequest
    ) -> Pin<Box<dyn Future<Output = InfoResponse> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn echo<'life0, 'async_trait>(
        &'life0 self,
        message: String
    ) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
fn set_option<'life0, 'async_trait>(
        &'life0 self,
        _set_option_request: SetOptionRequest
    ) -> Pin<Box<dyn Future<Output = Result<SetOptionResponse>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
fn query<'life0, 'async_trait>(
        &'life0 self,
        _query_request: QueryRequest
    ) -> Pin<Box<dyn Future<Output = Result<QueryResponse>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... } }

Trait for initialization and for queries from the user.

Required methods

fn info<'life0, 'async_trait>(
    &'life0 self,
    info_request: InfoRequest
) -> Pin<Box<dyn Future<Output = InfoResponse> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

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<'life0, 'async_trait>(
    &'life0 self,
    message: String
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Echo a string to test abci client/server implementation.

fn set_option<'life0, 'async_trait>(
    &'life0 self,
    _set_option_request: SetOptionRequest
) -> Pin<Box<dyn Future<Output = Result<SetOptionResponse>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Set non-consensus critical application specific options.

fn query<'life0, 'async_trait>(
    &'life0 self,
    _query_request: QueryRequest
) -> Pin<Box<dyn Future<Output = Result<QueryResponse>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

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

Loading content...

Implementors

Loading content...