Function sp_trie::verify_trie_proof
source · [−]pub fn verify_trie_proof<'a, L: TrieConfiguration, I, K, V>(
root: &TrieHash<L>,
proof: &[Vec<u8>],
items: I
) -> Result<(), VerifyError<TrieHash<L>, Error>> where
I: IntoIterator<Item = &'a (K, Option<V>)>,
K: 'a + AsRef<[u8]>,
V: 'a + AsRef<[u8]>,
Expand description
Verify a set of key-value pairs against a trie root and a proof.
Checks a set of keys with optional values for inclusion in the proof that was generated by
generate_trie_proof
.
If the value in the pair is supplied ((key, Some(value))
), this key-value pair will be
checked for inclusion in the proof.
If the value is omitted ((key, None)
), this key will be checked for non-inclusion in the
proof.