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

Fetch values immediately, updates #39

Closed adlerjohn closed 3 years ago

adlerjohn commented 3 years ago

Make updates as per https://github.com/celestiaorg/smt/pull/37#issuecomment-876416919.

Fixes #8 #14.

  1. Clean up readme.
  2. Remove Get/HasForRoot.
  3. Fetch values immediately instead of descending the tree.
  4. Add new methods to descend the tree for DSMST since key might not have been added with AddBranch.
codecov-commenter commented 3 years ago

Codecov Report

Merging #39 (49a51bb) into master (03ea407) will decrease coverage by 1.10%. The diff coverage is 61.76%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #39      +/-   ##
==========================================
- Coverage   87.47%   86.36%   -1.11%     
==========================================
  Files           6        6              
  Lines         455      462       +7     
==========================================
+ Hits          398      399       +1     
- Misses         31       36       +5     
- Partials       26       27       +1     
Impacted Files Coverage Δ
deepsubtree.go 63.46% <59.37%> (-6.54%) :arrow_down:
smt.go 81.33% <100.00%> (+0.93%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 03ea407...49a51bb. Read the comment docs.