Update db usage to new dvote.db interface version

This commit is contained in:
2021-08-02 13:26:14 +02:00
parent abc04a5868
commit 2514b3188f
13 changed files with 605 additions and 273 deletions

View File

@@ -8,12 +8,12 @@ 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 := db.NewBadgerDB(c.TempDir())
database, err := badgerdb.New(badgerdb.Options{Path: c.TempDir()})
c.Assert(err, qt.IsNil)
tree, err := arbo.NewTree(database, 4, arbo.HashFunctionPoseidon)
c.Assert(err, qt.IsNil)