pub trait DifficultyApi<Block: BlockT, Difficulty: Decode>: Core<Block> {
    fn difficulty(
        &self,
        __runtime_api_at_param__: &BlockId<Block>
    ) -> Result<Difficulty, ApiError> { ... } fn difficulty_with_context(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        context: ExecutionContext
    ) -> Result<Difficulty, ApiError> { ... } }
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§