paritytech / trie

Base-16 Modified Patricia Merkle Tree (aka Trie)
Apache License 2.0
251 stars 67 forks source link

Fix recorder for `NonExisting` keys #202

Closed bkchr closed 12 months ago

bkchr commented 12 months ago

We handle NonExisting keys as if we have recorded the value. The reason behind this is that we have recorded all the trie nodes to proof that the key doesn't exist in the trie. So, next time we want to access the key we can use the cache (if present) and do not net to iterate over the trie nodes again.

cheme commented 12 months ago

Is this the test ? https://github.com/paritytech/trie/blob/0b9bede27b33da6395e83ed13c523ed2ae913fc6/trie-db/src/lookup.rs#L441 None variant should work fine with it.

cheme commented 12 months ago

oh no, forget about it :)