mirror of
https://github.com/arnaucube/arbo.git
synced 2026-01-11 08:11:27 +01:00
Implement addBatchInDisk for big trees
Implement addBatchInDisk for big trees, which does not puts the tree in memory, and works directly over the db data, parallelizing for each CPU.
This commit is contained in:
@@ -8,12 +8,13 @@ import (
|
||||
|
||||
qt "github.com/frankban/quicktest"
|
||||
"github.com/vocdoni/arbo"
|
||||
"go.vocdoni.io/dvote/db"
|
||||
"go.vocdoni.io/dvote/db/badgerdb"
|
||||
)
|
||||
|
||||
func TestGenerator(t *testing.T) {
|
||||
c := qt.New(t)
|
||||
database, err := badgerdb.New(badgerdb.Options{Path: c.TempDir()})
|
||||
database, err := badgerdb.New(db.Options{Path: c.TempDir()})
|
||||
c.Assert(err, qt.IsNil)
|
||||
tree, err := arbo.NewTree(database, 4, arbo.HashFunctionPoseidon)
|
||||
c.Assert(err, qt.IsNil)
|
||||
|
||||
Reference in New Issue
Block a user