referrerpolicy=no-referrer-when-downgrade
bp_header_chain

Trait HeaderChain

Source
pub trait HeaderChain<C: Chain> {
    // Required method
    fn finalized_header_state_root(header_hash: HashOf<C>) -> Option<HashOf<C>>;

    // Provided method
    fn verify_storage_proof(
        header_hash: HashOf<C>,
        storage_proof: RawStorageProof,
    ) -> Result<StorageProofChecker<HasherOf<C>>, HeaderChainError> { ... }
}
Expand description

Substrate header chain, abstracted from the way it is stored.

Required Methods§

Source

fn finalized_header_state_root(header_hash: HashOf<C>) -> Option<HashOf<C>>

Returns state (storage) root of given finalized header.

Provided Methods§

Source

fn verify_storage_proof( header_hash: HashOf<C>, storage_proof: RawStorageProof, ) -> Result<StorageProofChecker<HasherOf<C>>, HeaderChainError>

Get storage proof checker using finalized header.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

impl<T: Config<I>, I: 'static> HeaderChain<<T as Config<I>>::BridgedChain> for GrandpaChainHeaders<T, I>

impl<T: Config<I>, I: 'static, C: Parachain<Hash = ParaHash>> HeaderChain<C> for ParachainHeaders<T, I, C>