pub trait Core<Block: BlockT>: 'static + Send {
// Provided methods
fn version(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<RuntimeVersion, ApiError> { ... }
fn version_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<RuntimeVersion, ApiError> { ... }
fn execute_block(
&self,
__runtime_api_at_param__: &BlockId<Block>,
block: Block
) -> Result<(), ApiError> { ... }
fn execute_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
block: Block
) -> Result<(), ApiError> { ... }
fn initialize_block(
&self,
__runtime_api_at_param__: &BlockId<Block>,
header: &<Block as BlockT>::Header
) -> Result<(), ApiError> { ... }
fn initialize_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &<Block as BlockT>::Header
) -> Result<(), ApiError> { ... }
}
Expand description
The Core
runtime api that every Substrate runtime needs to implement.
Provided Methods§
sourcefn version(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<RuntimeVersion, ApiError>
fn version( &self, __runtime_api_at_param__: &BlockId<Block> ) -> Result<RuntimeVersion, ApiError>
Returns the version of the runtime.
sourcefn version_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<RuntimeVersion, ApiError>
fn version_with_context( &self, __runtime_api_at_param__: &BlockId<Block>, context: ExecutionContext ) -> Result<RuntimeVersion, ApiError>
Returns the version of the runtime.
sourcefn execute_block(
&self,
__runtime_api_at_param__: &BlockId<Block>,
block: Block
) -> Result<(), ApiError>
fn execute_block( &self, __runtime_api_at_param__: &BlockId<Block>, block: Block ) -> Result<(), ApiError>
Execute the given block.
sourcefn execute_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
block: Block
) -> Result<(), ApiError>
fn execute_block_with_context( &self, __runtime_api_at_param__: &BlockId<Block>, context: ExecutionContext, block: Block ) -> Result<(), ApiError>
Execute the given block.
sourcefn initialize_block(
&self,
__runtime_api_at_param__: &BlockId<Block>,
header: &<Block as BlockT>::Header
) -> Result<(), ApiError>
fn initialize_block( &self, __runtime_api_at_param__: &BlockId<Block>, header: &<Block as BlockT>::Header ) -> Result<(), ApiError>
Initialize a block with the given header.
sourcefn initialize_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &<Block as BlockT>::Header
) -> Result<(), ApiError>
fn initialize_block_with_context( &self, __runtime_api_at_param__: &BlockId<Block>, context: ExecutionContext, header: &<Block as BlockT>::Header ) -> Result<(), ApiError>
Initialize a block with the given header.