Trait sp_consensus_pow::TimestampApi[][src]

pub trait TimestampApi<Block: BlockT, Moment: Decode>: Core<Block> {
    fn timestamp(
        &self,
        __runtime_api_at_param__: &BlockId<Block>
    ) -> Result<Moment, Self::Error> { ... }
fn timestamp_with_context(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        context: ExecutionContext
    ) -> Result<Moment, Self::Error> { ... } }

API necessary for timestamp-based difficulty adjustment algorithms.

Provided methods

fn timestamp(
    &self,
    __runtime_api_at_param__: &BlockId<Block>
) -> Result<Moment, Self::Error>
[src]

Return the timestamp in the current block.

fn timestamp_with_context(
    &self,
    __runtime_api_at_param__: &BlockId<Block>,
    context: ExecutionContext
) -> Result<Moment, Self::Error>
[src]

Return the timestamp in the current block.

Loading content...

Trait Implementations

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

Implementors

Loading content...