Trait BlockParticipationApi

Source
pub trait BlockParticipationApi<Block: BlockT, BlockProducerId: Decode>: Core<Block> {
    // Provided methods
    fn should_release_data(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        slot: Slot,
    ) -> Result<Option<Slot>, ApiError> { ... }
    fn blocks_produced_up_to_slot(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        slot: Slot,
    ) -> Result<Vec<(Slot, BlockProducerId)>, ApiError> { ... }
    fn target_inherent_id(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
    ) -> Result<InherentIdentifier, ApiError> { ... }
}
Expand description

Runtime api exposing configuration and runtime bindings necessary for inherent_data::BlockParticipationInherentDataProvider.

This API should typically be implemented by simply exposing relevant functions and data from the feature’s pallet.

Provided Methods§

Source

fn should_release_data( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, slot: Slot, ) -> Result<Option<Slot>, ApiError>

Returns slot up to which block production data should be released or None.

Source

fn blocks_produced_up_to_slot( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, slot: Slot, ) -> Result<Vec<(Slot, BlockProducerId)>, ApiError>

Returns block authors since last processing up to slot.

Source

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

Returns the inherent ID under which block participation data should be provided.

Trait Implementations§

Source§

impl<Block: BlockT, BlockProducerId: Decode> RuntimeApiInfo for dyn BlockParticipationApi<Block, BlockProducerId>

Source§

const ID: [u8; 8]

The identifier of the runtime api.
Source§

const VERSION: u32 = 1u32

The version of the runtime api.

Implementors§