[][src]Trait sp_consensus_babe::BabeApi

pub trait BabeApi<Block: BlockT>: Core<Block> {
    fn configuration(
        &self,
        __runtime_api_at_param__: &BlockId<Block>
    ) -> Result<BabeConfiguration, Self::Error> { ... }
fn configuration_with_context(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        context: ExecutionContext
    ) -> Result<BabeConfiguration, Self::Error> { ... }
fn current_epoch_start(
        &self,
        __runtime_api_at_param__: &BlockId<Block>
    ) -> Result<SlotNumber, Self::Error> { ... }
fn current_epoch_start_with_context(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        context: ExecutionContext
    ) -> Result<SlotNumber, Self::Error> { ... } }

API necessary for block authorship with BABE.

Provided methods

fn configuration(
    &self,
    __runtime_api_at_param__: &BlockId<Block>
) -> Result<BabeConfiguration, Self::Error>

Return the configuration for BABE. Currently, only the value provided by this type at genesis will be used.

Dynamic configuration may be supported in the future.

fn configuration_with_context(
    &self,
    __runtime_api_at_param__: &BlockId<Block>,
    context: ExecutionContext
) -> Result<BabeConfiguration, Self::Error>

Return the configuration for BABE. Currently, only the value provided by this type at genesis will be used.

Dynamic configuration may be supported in the future.

fn current_epoch_start(
    &self,
    __runtime_api_at_param__: &BlockId<Block>
) -> Result<SlotNumber, Self::Error>

Returns the slot number that started the current epoch.

fn current_epoch_start_with_context(
    &self,
    __runtime_api_at_param__: &BlockId<Block>,
    context: ExecutionContext
) -> Result<SlotNumber, Self::Error>

Returns the slot number that started the current epoch.

Loading content...

Trait Implementations

impl<Block: BlockT, __Sr_Api_Error__> RuntimeApiInfo for dyn BabeApi<Block, Error = __Sr_Api_Error__>[src]

Implementors

Loading content...