Remove positions
map from the tree structure
#24
Labels
team:Core
Low Level Core Development Team (Rust)
type:enhancement
Issues concerning code or feature improvement (performance, refactoring, etc)
Summary
Given the fact that we can arbitrarily walk the tree, it shouldn't be necessary to include existing
positions
since we could use awalker
to determine both how many positions in the tree are filled (Tree::len()
), as well which positions are filled (Tree::contains
).Relevant Context
Merkle trees sometimes carry information about the pre-image of their leaves (data blocks). Since a decision was made to have this tree not contain this, and the
position
field feels like much the same information, it should also be removed.Possible Solution (optional)
Use a pre-defined
walk
to iterate through all leaves by counting them.The text was updated successfully, but these errors were encountered: