referrerpolicy=no-referrer-when-downgrade

Trait TargetBlockRate

Source
pub trait TargetBlockRate<Block: BlockT>: Core<Block> {
    // Provided method
    fn target_block_rate(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
    ) -> Result<u32, ApiError> { ... }
}
Expand description

API for parachain target block rate.

This runtime API allows the parachain runtime to communicate the target block rate to the node side. The target block rate is always valid for the next relay chain slot.

The runtime can not enforce this target block rate. It only acts as a maximum, but not more. In the end it depends on the collator how many blocks will be produced. If there are no cores available or the collator is offline, no blocks at all will be produced.

Provided Methods§

Source

fn target_block_rate( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<u32, ApiError>

Get the target block rate for this parachain.

Returns the target number of blocks per relay chain slot.

Trait Implementations§

Source§

impl<Block: BlockT> RuntimeApiInfo for dyn TargetBlockRate<Block>

Source§

const ID: [u8; 8]

The identifier of the runtime api.
Source§

const VERSION: u32 = 1u32

The version of the runtime api.

Implementors§