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

Annotate HexaryTrie.root_node, and remove setter #106

Merged
merged 2 commits into from
May 27, 2020

Conversation

carver
Copy link
Contributor

@carver carver commented May 19, 2020

What was wrong?

Fix #103

How was it fixed?

Annotate the return value, update tests that used the raw root node, and add a new test that HexaryTrie().root_node == HexaryTrie().traverse(())

Also removed the setter. Do we really need it? I guess for symmetry, you would want to set with an annotated node.

Finally: Updated the traverse_from() API to take the new annotated node instead of the raw node. It seemed silly to return an annotated node and expect a raw one back as an argument.

TODO

  • squash

Cute Animal Picture

Cute animal picture

Also, TrieFrontierCache caches the whole node, now.
@carver
Copy link
Contributor Author

carver commented May 26, 2020

I think I'll rage-merge tomorrow. It's pretty small, just a couple cleanups, really.

@carver carver merged commit f79bf0d into ethereum:master May 27, 2020
@carver carver deleted the annotated-root-node branch May 27, 2020 17:30
@carver carver mentioned this pull request May 27, 2020
2 tasks
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.

Return annotated node from HexaryTrie.root_node
2 participants