![]() Returning tuples is often confusing as they don't convey meaning and it should be used only when there is no possible ambiguity. For `MerkleStore`, we had a couple of tuples being returned, and reading the implementation was required in order to distinguish if they were leaf values or computed roots. This commit introduces two containers that will self-document these returns: `RootPath` and `ValuePath`. It will also update `set_node` to return both the new root & the new path, so we can prevent duplicated traversals downstream when updating a node (one to update, the second to fetch the new path/root). |
||
---|---|---|
.. | ||
mmr | ||
simple_smt | ||
store | ||
empty_roots.rs | ||
index.rs | ||
merkle_tree.rs | ||
mod.rs | ||
path.rs | ||
path_set.rs |