Trait sp_consensus_aura::AuraApi
source · pub trait AuraApi<Block: BlockT, AuthorityId: Codec>: Core<Block> {
// Provided methods
fn slot_duration(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<SlotDuration, ApiError> { ... }
fn slot_duration_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<SlotDuration, ApiError> { ... }
fn authorities(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<Vec<AuthorityId>, ApiError> { ... }
fn authorities_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<Vec<AuthorityId>, ApiError> { ... }
}
Expand description
API necessary for block authorship with aura.
Provided Methods§
sourcefn slot_duration(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<SlotDuration, ApiError>
fn slot_duration( &self, __runtime_api_at_param__: &BlockId<Block> ) -> Result<SlotDuration, ApiError>
Returns the slot duration for Aura.
Currently, only the value provided by this type at genesis will be used.
sourcefn slot_duration_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<SlotDuration, ApiError>
fn slot_duration_with_context( &self, __runtime_api_at_param__: &BlockId<Block>, context: ExecutionContext ) -> Result<SlotDuration, ApiError>
Returns the slot duration for Aura.
Currently, only the value provided by this type at genesis will be used.
Return the current set of authorities.
Return the current set of authorities.