Trait tp_consensus_pow::DifficultyApi[][src]

pub trait DifficultyApi<Block: BlockT, Difficulty: Decode>: Core<Block> {
    fn difficulty(
        &self,
        __runtime_api_at_param__: &BlockId<Block>
    ) -> Result<Difficulty, Self::Error> { ... }
fn difficulty_with_context(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        context: ExecutionContext
    ) -> Result<Difficulty, Self::Error> { ... } }
Expand description

API for those chains that put their difficulty adjustment algorithm directly onto runtime. Note that while putting difficulty adjustment algorithm to runtime is safe, putting the PoW algorithm on runtime is not.

Provided methods

Return the target difficulty of the next block.

Return the target difficulty of the next block.

Trait Implementations

The identifier of the runtime api.

The version of the runtime api.

Implementors