celestiaorg / nmt

Namespaced Merkle Tree
Apache License 2.0
112 stars 39 forks source link

Compare new and old range calculation #193

Closed staheri14 closed 1 year ago

staheri14 commented 1 year ago

Overview

This PR is not for review, but rather to demonstrate that part of the changes introduced by https://github.com/celestiaorg/nmt/pull/188, aiming at simplifying the calculation of the namespace range of the parent node from its children under the IgnoreMaxNamespace flag, is consistent with the old version. Please check the TestComputeNsRange() function where we show that the result of the computeNsRange (that corresponds to the simplified code) and ComputeNsRangeVerbose (that corresponds to the old version of the code) are identical for all combination of inputs.

Checklist

mergify[bot] commented 1 year ago

:warning: The sha of the head commit of this PR conflicts with #188. Mergify cannot evaluate rules on this PR. :warning:

codecov[bot] commented 1 year ago

Codecov Report

Merging #193 (7f6d63d) into master (fd00c52) will increase coverage by 0.03%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #193      +/-   ##
==========================================
+ Coverage   95.71%   95.75%   +0.03%     
==========================================
  Files           5        5              
  Lines         560      565       +5     
==========================================
+ Hits          536      541       +5     
  Misses         14       14              
  Partials       10       10              
Impacted Files Coverage Δ
hasher.go 97.69% <100.00%> (+0.09%) :arrow_up:
staheri14 commented 1 year ago

Closing this PR, no longer needed.