Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty proof for small trie #7

Open
klkvr opened this issue Apr 2, 2024 · 0 comments
Open

Empty proof for small trie #7

klkvr opened this issue Apr 2, 2024 · 0 comments

Comments

@klkvr
Copy link
Member

klkvr commented Apr 2, 2024

If trie consists of a single leaf node, no proofs would be collected if only non-existent prefixes are passed into proof retainer.

Example:

let mut builder =
    HashBuilder::default().with_proof_retainer(vec![Nibbles::from_nibbles(&[0x01])]);

builder.add_leaf(Nibbles::from_nibbles(&[0x00]), &[0x00]);

let _ = builder.root();

// Empty but should include root node
assert!(builder.take_proofs().is_empty());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant