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§
Sourcefn finalized_header_state_root(header_hash: HashOf<C>) -> Option<HashOf<C>>
fn finalized_header_state_root(header_hash: HashOf<C>) -> Option<HashOf<C>>
Returns state (storage) root of given finalized header.
Provided Methods§
Sourcefn verify_storage_proof(
header_hash: HashOf<C>,
storage_proof: RawStorageProof,
) -> Result<StorageProofChecker<HasherOf<C>>, HeaderChainError>
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.