feat(trie): account & storage proofs (#5041)

This commit is contained in:
Roman Krasiuk
2023-10-17 10:28:05 +03:00
committed by GitHub
parent 3eb02656ca
commit 12ac1f153f
12 changed files with 560 additions and 263 deletions

View File

@@ -37,6 +37,15 @@ pub struct PrefixSetMut {
index: usize,
}
impl<I> From<I> for PrefixSetMut
where
I: IntoIterator<Item = Nibbles>,
{
fn from(value: I) -> Self {
PrefixSetMut { keys: value.into_iter().collect(), ..Default::default() }
}
}
impl PrefixSetMut {
/// Returns `true` if any of the keys in the set has the given prefix or
/// if the given prefix is a prefix of any key in the set.