Skip to main content

verify_range_proof

Function verify_range_proof 

Source
pub fn verify_range_proof<I, V>(
    root: FixedBytes<32>,
    origin: FixedBytes<32>,
    limit: FixedBytes<32>,
    leaves: I,
    proof: &[Bytes],
) -> Result<Option<FixedBytes<32>>, RangeProofError>
where I: IntoIterator<Item = (FixedBytes<32>, V)>, V: Into<Vec<u8>>,
Available on crate feature trie only.
Expand description

Verifies a consecutive leaf range against root, from origin through limit.

When leaves is empty, limit supplies the response’s right boundary so an empty interval can be authenticated without requiring a leaf past the limit.

Returns a lower bound for the next key, or None if the range exhausts the trie.