// This is the simplest case: the key that is found at this
// level in the recursion needs to match the unique one in
// the list of keys that belong to the proof.
if keys.len() != 1 {
return Err(format!(
"Expecting exactly 1 key in leaf, got {}: {:?}",
keys.len(),
keys
));
}
Instead, it should encode the fact that at most one value is present.
For example, if the trie has the following keys:
then the structure will be like:
root(branch(leaf([0,0]), leaf([0, 0]), empty, empty, ...)
If then
make_multiproof
is called with values......it will fail because of the following check:
Instead, it should encode the fact that at most one value is present.