Function sc_domains::generate_mmr_proof

source ยท
pub fn generate_mmr_proof<CClient, CBlock>(
    consensus_client: &Arc<CClient>,
    to_prove: NumberFor<CBlock>,
) -> Result<ConsensusChainMmrLeafProof<NumberFor<CBlock>, CBlock::Hash, H256>>
where CBlock: BlockT, CClient: HeaderBackend<CBlock> + ProvideRuntimeApi<CBlock> + 'static, CClient::Api: MmrApi<CBlock, H256, NumberFor<CBlock>>,
Expand description

Generate MMR proof for the block to_prove in the current best fork. The returned proof can be later used to verify stateless (without query offchain MMR leaf) and extract the state root at to_prove.