mirror of
https://github.com/arnaucube/arbo.git
synced 2026-01-11 08:11:27 +01:00
Add thresholdNLeafs configurable
ThresholdNLeafs defines the threshold number of leafs in the tree that determines if AddBatch will work in memory or in disk. It is defined when calling NewTree, and if set to 0 it will work always in disk.
This commit is contained in:
@@ -16,7 +16,8 @@ func TestGenerator(t *testing.T) {
|
||||
c := qt.New(t)
|
||||
database, err := badgerdb.New(db.Options{Path: c.TempDir()})
|
||||
c.Assert(err, qt.IsNil)
|
||||
tree, err := arbo.NewTree(database, 4, arbo.HashFunctionPoseidon)
|
||||
tree, err := arbo.NewTree(arbo.Config{Database: database, MaxLevels: 4,
|
||||
HashFunction: arbo.HashFunctionPoseidon})
|
||||
c.Assert(err, qt.IsNil)
|
||||
|
||||
testVector := [][]int64{
|
||||
|
||||
Reference in New Issue
Block a user