mirror of
https://github.com/arnaucube/arbo.git
synced 2026-01-15 01:41:28 +01:00
Remove cropping on pow of two the kvs for AddBatch
- Remove cropping on power of two the kvs for AddBatch - As not needed to be power of two length with the Virtual Tree - Fix keyValuesToKvs keyPath
This commit is contained in:
@@ -267,11 +267,11 @@ func TestGenProofAndVerify(t *testing.T) {
|
||||
}
|
||||
|
||||
k := BigIntToBytes(big.NewInt(int64(7)))
|
||||
_, siblings, err := tree.GenProof(k)
|
||||
c.Assert(err, qt.IsNil)
|
||||
|
||||
k = BigIntToBytes(big.NewInt(int64(7)))
|
||||
v := BigIntToBytes(big.NewInt(int64(14)))
|
||||
proofV, siblings, err := tree.GenProof(k)
|
||||
c.Assert(err, qt.IsNil)
|
||||
c.Assert(proofV, qt.DeepEquals, v)
|
||||
|
||||
verif, err := CheckProof(tree.hashFunction, k, v, tree.Root(), siblings)
|
||||
c.Assert(err, qt.IsNil)
|
||||
c.Check(verif, qt.IsTrue)
|
||||
|
||||
Reference in New Issue
Block a user