Trait tendermint_abci::Application [−][src]
pub trait Application: Send + Clone + 'static {}Show methods
fn echo(&self, request: RequestEcho) -> ResponseEcho { ... } fn info(&self, _request: RequestInfo) -> ResponseInfo { ... } fn init_chain(&self, _request: RequestInitChain) -> ResponseInitChain { ... } fn query(&self, _request: RequestQuery) -> ResponseQuery { ... } fn check_tx(&self, _request: RequestCheckTx) -> ResponseCheckTx { ... } fn begin_block(&self, _request: RequestBeginBlock) -> ResponseBeginBlock { ... } fn deliver_tx(&self, _request: RequestDeliverTx) -> ResponseDeliverTx { ... } fn end_block(&self, _request: RequestEndBlock) -> ResponseEndBlock { ... } fn flush(&self) -> ResponseFlush { ... } fn commit(&self) -> ResponseCommit { ... } fn set_option(&self, _request: RequestSetOption) -> ResponseSetOption { ... } fn list_snapshots(&self) -> ResponseListSnapshots { ... } fn offer_snapshot(
&self,
_request: RequestOfferSnapshot
) -> ResponseOfferSnapshot { ... } fn load_snapshot_chunk(
&self,
_request: RequestLoadSnapshotChunk
) -> ResponseLoadSnapshotChunk { ... } fn apply_snapshot_chunk(
&self,
_request: RequestApplySnapshotChunk
) -> ResponseApplySnapshotChunk { ... }
Expand description
An ABCI application.
Applications are Send
+ Clone
+ 'static
because they are cloned for
each incoming connection to the ABCI Server
. It is up to the
application developer to manage shared state between these clones of their
application.
Provided methods
fn echo(&self, request: RequestEcho) -> ResponseEcho
fn echo(&self, request: RequestEcho) -> ResponseEcho
Echo back the same message as provided in the request.
fn info(&self, _request: RequestInfo) -> ResponseInfo
fn info(&self, _request: RequestInfo) -> ResponseInfo
Provide information about the ABCI application.
fn init_chain(&self, _request: RequestInitChain) -> ResponseInitChain
fn init_chain(&self, _request: RequestInitChain) -> ResponseInitChain
Called once upon genesis.
fn query(&self, _request: RequestQuery) -> ResponseQuery
fn query(&self, _request: RequestQuery) -> ResponseQuery
Query the application for data at the current or past height.
fn check_tx(&self, _request: RequestCheckTx) -> ResponseCheckTx
fn check_tx(&self, _request: RequestCheckTx) -> ResponseCheckTx
Check the given transaction before putting it into the local mempool.
fn begin_block(&self, _request: RequestBeginBlock) -> ResponseBeginBlock
fn begin_block(&self, _request: RequestBeginBlock) -> ResponseBeginBlock
Signals the beginning of a new block, prior to any DeliverTx
calls.
fn deliver_tx(&self, _request: RequestDeliverTx) -> ResponseDeliverTx
fn deliver_tx(&self, _request: RequestDeliverTx) -> ResponseDeliverTx
Apply a transaction to the application’s state.
fn end_block(&self, _request: RequestEndBlock) -> ResponseEndBlock
fn end_block(&self, _request: RequestEndBlock) -> ResponseEndBlock
Signals the end of a block.
fn flush(&self) -> ResponseFlush
fn flush(&self) -> ResponseFlush
Signals that messages queued on the client should be flushed to the server.
fn commit(&self) -> ResponseCommit
fn commit(&self) -> ResponseCommit
Commit the current state at the current height.
fn set_option(&self, _request: RequestSetOption) -> ResponseSetOption
fn set_option(&self, _request: RequestSetOption) -> ResponseSetOption
Allows the Tendermint node to request that the application set an option to a particular value.
fn list_snapshots(&self) -> ResponseListSnapshots
fn list_snapshots(&self) -> ResponseListSnapshots
Used during state sync to discover available snapshots on peers.
fn offer_snapshot(
&self,
_request: RequestOfferSnapshot
) -> ResponseOfferSnapshot
fn offer_snapshot(
&self,
_request: RequestOfferSnapshot
) -> ResponseOfferSnapshot
Called when bootstrapping the node using state sync.
fn load_snapshot_chunk(
&self,
_request: RequestLoadSnapshotChunk
) -> ResponseLoadSnapshotChunk
fn load_snapshot_chunk(
&self,
_request: RequestLoadSnapshotChunk
) -> ResponseLoadSnapshotChunk
Used during state sync to retrieve chunks of snapshots from peers.
fn apply_snapshot_chunk(
&self,
_request: RequestApplySnapshotChunk
) -> ResponseApplySnapshotChunk
fn apply_snapshot_chunk(
&self,
_request: RequestApplySnapshotChunk
) -> ResponseApplySnapshotChunk
Apply the given snapshot chunk to the application’s state.