Replace naive AddBatch by optimized AddBatch

- Replace naive AddBatch by optimized AddBatch
- Add blake2b hash support
- Expose needed methods for external usage (ReadLeafValue,
ReadIntermediateChilds)
- Return 'value' in GenProof
This commit is contained in:
2021-05-08 15:24:08 +02:00
parent 0eda440d93
commit 6dcbbdf4a5
9 changed files with 99 additions and 68 deletions

View File

@@ -267,7 +267,7 @@ func TestGenProofAndVerify(t *testing.T) {
}
k := BigIntToBytes(big.NewInt(int64(7)))
siblings, err := tree.GenProof(k)
_, siblings, err := tree.GenProof(k)
c.Assert(err, qt.IsNil)
k = BigIntToBytes(big.NewInt(int64(7)))