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