celestiaorg / smt

A Go library that implements a Sparse Merkle tree for a key-value map.
https://godoc.org/github.com/celestiaorg/smt
MIT License
138 stars 53 forks source link

Introduce Delete and Has methods #11

Closed tzdybal closed 3 years ago

tzdybal commented 3 years ago

Right now it's not obvious how to execute Delete operation and check value existence (you need to take a look in the code). I think Delete and Has methods should be added.

Alternatively, defaultValue should be exported and comments to Get and Update added to explicitly state this.