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

Fix recorder for NonExisting keys #202

Merged
merged 1 commit into from
Sep 13, 2023
Merged

Fix recorder for NonExisting keys #202

merged 1 commit into from
Sep 13, 2023

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Sep 13, 2023

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.

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
Copy link
Contributor

cheme commented Sep 13, 2023

Is this the test ?

.map(|r| !r.trie_nodes_recorded_for_key(full_key).is_none())
None variant should work fine with it.

@cheme
Copy link
Contributor

cheme commented Sep 13, 2023

oh no, forget about it :)

@bkchr bkchr merged commit 66774b3 into master Sep 13, 2023
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

Successfully merging this pull request may close these issues.

3 participants