pub trait Application {
Show 15 methods
// Provided methods
fn echo(
&self,
request: RequestEcho,
) -> Result<ResponseEcho, ResponseException> { ... }
fn flush(
&self,
_request: RequestFlush,
) -> Result<ResponseFlush, ResponseException> { ... }
fn info(
&self,
request: RequestInfo,
) -> Result<ResponseInfo, ResponseException> { ... }
fn init_chain(
&self,
_request: RequestInitChain,
) -> Result<ResponseInitChain, ResponseException> { ... }
fn query(
&self,
_request: RequestQuery,
) -> Result<ResponseQuery, ResponseException> { ... }
fn check_tx(
&self,
_request: RequestCheckTx,
) -> Result<ResponseCheckTx, ResponseException> { ... }
fn list_snapshots(
&self,
_request: RequestListSnapshots,
) -> Result<ResponseListSnapshots, ResponseException> { ... }
fn offer_snapshot(
&self,
_request: RequestOfferSnapshot,
) -> Result<ResponseOfferSnapshot, ResponseException> { ... }
fn load_snapshot_chunk(
&self,
_request: RequestLoadSnapshotChunk,
) -> Result<ResponseLoadSnapshotChunk, ResponseException> { ... }
fn apply_snapshot_chunk(
&self,
_request: RequestApplySnapshotChunk,
) -> Result<ResponseApplySnapshotChunk, ResponseException> { ... }
fn extend_vote(
&self,
_request: RequestExtendVote,
) -> Result<ResponseExtendVote, ResponseException> { ... }
fn finalize_block(
&self,
_request: RequestFinalizeBlock,
) -> Result<ResponseFinalizeBlock, ResponseException> { ... }
fn prepare_proposal(
&self,
_request: RequestPrepareProposal,
) -> Result<ResponsePrepareProposal, ResponseException> { ... }
fn process_proposal(
&self,
_request: RequestProcessProposal,
) -> Result<ResponseProcessProposal, ResponseException> { ... }
fn verify_vote_extension(
&self,
_request: RequestVerifyVoteExtension,
) -> Result<ResponseVerifyVoteExtension, ResponseException> { ... }
}Expand description
An ABCI application.
Provided Methods§
Sourcefn echo(&self, request: RequestEcho) -> Result<ResponseEcho, ResponseException>
fn echo(&self, request: RequestEcho) -> Result<ResponseEcho, ResponseException>
Echo back the same message as provided in the request.
Sourcefn flush(
&self,
_request: RequestFlush,
) -> Result<ResponseFlush, ResponseException>
fn flush( &self, _request: RequestFlush, ) -> Result<ResponseFlush, ResponseException>
Signals that messages queued on the client should be flushed to the server.
Sourcefn info(&self, request: RequestInfo) -> Result<ResponseInfo, ResponseException>
fn info(&self, request: RequestInfo) -> Result<ResponseInfo, ResponseException>
Provide information about the ABCI application.
Sourcefn init_chain(
&self,
_request: RequestInitChain,
) -> Result<ResponseInitChain, ResponseException>
fn init_chain( &self, _request: RequestInitChain, ) -> Result<ResponseInitChain, ResponseException>
Called once upon genesis.
Sourcefn query(
&self,
_request: RequestQuery,
) -> Result<ResponseQuery, ResponseException>
fn query( &self, _request: RequestQuery, ) -> Result<ResponseQuery, ResponseException>
Query the application for data at the current or past height.
Sourcefn check_tx(
&self,
_request: RequestCheckTx,
) -> Result<ResponseCheckTx, ResponseException>
fn check_tx( &self, _request: RequestCheckTx, ) -> Result<ResponseCheckTx, ResponseException>
Check the given transaction before putting it into the local mempool.
Sourcefn list_snapshots(
&self,
_request: RequestListSnapshots,
) -> Result<ResponseListSnapshots, ResponseException>
fn list_snapshots( &self, _request: RequestListSnapshots, ) -> Result<ResponseListSnapshots, ResponseException>
Used during state sync to discover available snapshots on peers.
Sourcefn offer_snapshot(
&self,
_request: RequestOfferSnapshot,
) -> Result<ResponseOfferSnapshot, ResponseException>
fn offer_snapshot( &self, _request: RequestOfferSnapshot, ) -> Result<ResponseOfferSnapshot, ResponseException>
Called when bootstrapping the node using state sync.
Sourcefn load_snapshot_chunk(
&self,
_request: RequestLoadSnapshotChunk,
) -> Result<ResponseLoadSnapshotChunk, ResponseException>
fn load_snapshot_chunk( &self, _request: RequestLoadSnapshotChunk, ) -> Result<ResponseLoadSnapshotChunk, ResponseException>
Used during state sync to retrieve chunks of snapshots from peers.
Sourcefn apply_snapshot_chunk(
&self,
_request: RequestApplySnapshotChunk,
) -> Result<ResponseApplySnapshotChunk, ResponseException>
fn apply_snapshot_chunk( &self, _request: RequestApplySnapshotChunk, ) -> Result<ResponseApplySnapshotChunk, ResponseException>
Apply the given snapshot chunk to the application’s state.