Trait sp_offchain::OffchainWorkerApi
source · pub trait OffchainWorkerApi<Block: BlockT>: Core<Block> {
// Provided methods
fn offchain_worker_before_version_2(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
number: NumberFor<Block>,
) -> Result<(), ApiError> { ... }
fn offchain_worker(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
header: &Block::Header,
) -> Result<(), ApiError> { ... }
}
Expand description
The offchain worker api.
Provided Methods§
sourcefn offchain_worker_before_version_2(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
number: NumberFor<Block>,
) -> Result<(), ApiError>
👎Deprecated
fn offchain_worker_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, number: NumberFor<Block>, ) -> Result<(), ApiError>
Starts the off-chain task for given block number.
sourcefn offchain_worker(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
header: &Block::Header,
) -> Result<(), ApiError>
fn offchain_worker( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, header: &Block::Header, ) -> Result<(), ApiError>
Starts the off-chain task for given block header.