BlockProductionLogApi

Trait BlockProductionLogApi 

Source
pub trait BlockProductionLogApi<Block: BlockT, Author, Moment>: Core<Block>
where Author: Decode, Moment: Encode,
{ // Provided method fn get_author( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, moment: &Moment, ) -> Result<Option<Author>, ApiError> { ... } }
Expand description

Runtime API exposing data required for the BlockAuthorInherentProvider to operate. Type parameters:

  • Author: type representing a committee member eligible to be a block author. This type should correspond to what is configured as the block author type used by the pallet.

Provided Methods§

Source

fn get_author( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, moment: &Moment, ) -> Result<Option<Author>, ApiError>

Function returning the current block’s author.

Its implementation must either use data exposed by the consensus mechanism used by the Partner Chain, independently calculate it, or obtain it from another source.

Parameters:

  • moment: value representing the current block’s moment in time. It will typically be a timestamp or slot but can be any other value that is needed to decide the current block’s author and can be passed from the node.

Trait Implementations§

Source§

impl<Block: BlockT, Author, Moment> RuntimeApiInfo for dyn BlockProductionLogApi<Block, Author, Moment>

Source§

const ID: [u8; 8]

The identifier of the runtime api.
Source§

const VERSION: u32 = 1u32

The version of the runtime api.

Implementors§