reth_trie_common::proof

Function verify_proof

pub fn verify_proof<'a, I>(
    root: FixedBytes<32>,
    key: Nibbles,
    expected_value: Option<Vec<u8>>,
    proof: I,
) -> Result<(), ProofVerificationError>
where I: IntoIterator<Item = &'a Bytes>,
Expand description

Verify the proof for given key value pair against the provided state root.

The expected node value can be either Some if it’s expected to be present in the tree or None if this is an exclusion proof.