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§
Sourcefn should_release_data(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
slot: Slot,
) -> Result<Option<Slot>, ApiError>
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.
Sourcefn blocks_produced_up_to_slot(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
slot: Slot,
) -> Result<Vec<(Slot, BlockProducerId)>, ApiError>
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
.
Sourcefn target_inherent_id(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<InherentIdentifier, ApiError>
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.