Trait sp_state_machine::ChangesTrieRootsStorage[][src]

pub trait ChangesTrieRootsStorage<H: Hasher, Number: BlockNumber>: Send + Sync {
    fn build_anchor(
        &self,
        hash: H::Out
    ) -> Result<AnchorBlockId<H::Out, Number>, String>;
fn root(
        &self,
        anchor: &AnchorBlockId<H::Out, Number>,
        block: Number
    ) -> Result<Option<H::Out>, String>; }

Changes trie storage. Provides access to trie roots and trie nodes.

Required methods

fn build_anchor(
    &self,
    hash: H::Out
) -> Result<AnchorBlockId<H::Out, Number>, String>
[src]

Resolve hash of the block into anchor.

fn root(
    &self,
    anchor: &AnchorBlockId<H::Out, Number>,
    block: Number
) -> Result<Option<H::Out>, String>
[src]

Get changes trie root for the block with given number which is an ancestor (or the block itself) of the anchor_block (i.e. anchor_block.number >= block).

Loading content...

Implementors

impl<H: Hasher, Number: BlockNumber> RootsStorage<H, Number> for InMemoryStorage<H, Number>[src]

Loading content...