Annotate HexaryTrie.root_node, and remove setter #106
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Cute Animal Picture