Optimize ScCommitmentTree
Opened this issue · 0 comments
DanieleDiBenedetto commented
Currently, sc_tree_alive and sc_tree_ceased are handled as vectors, and multiple researches are performed into them. We can:
- Replace vectors with hash maps;
- Minimize the number of researches performed.
Also it would be comfortable, when adding a leaf, to return Result<usize, Error> instead of a bool, where the usize would be the position of the inserted leaf