From f10265ed4089cd9a7c2505413db317d425ef6ed4 Mon Sep 17 00:00:00 2001 From: arnaucube Date: Tue, 8 Jun 2021 11:22:36 +0200 Subject: [PATCH] Migrate repository to github.com/vocdoni/arbo --- README.md | 7 +++---- go.mod | 2 +- tree.go | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 293b92a..565960b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# arbo [![GoDoc](https://godoc.org/github.com/arnaucube/arbo?status.svg)](https://godoc.org/github.com/arnaucube/arbo) [![Go Report Card](https://goreportcard.com/badge/github.com/arnaucube/arbo)](https://goreportcard.com/report/github.com/arnaucube/arbo) [![Test](https://github.com/arnaucube/arbo/workflows/Test/badge.svg)](https://github.com/arnaucube/arbo/actions?query=workflow%3ATest) +# arbo [![GoDoc](https://godoc.org/github.com/vocdoni/arbo?status.svg)](https://godoc.org/github.com/vocdoni/arbo) [![Go Report Card](https://goreportcard.com/badge/github.com/vocdoni/arbo)](https://goreportcard.com/report/github.com/vocdoni/arbo) [![Test](https://github.com/vocdoni/arbo/workflows/Test/badge.svg)](https://github.com/vocdoni/arbo/actions?query=workflow%3ATest) > *arbo*: tree in Esperanto. @@ -20,14 +20,13 @@ database, err := db.NewBadgerDB(c.TempDir()) // create new Tree with maxLevels=100 and Blake2b hash function tree, err := arbo.NewTree(database, 100, arbo.HashFunctionBlake2b) - key := []byte("hello") value := []byte("world") +// Add a key & value into the merkle tree err = tree.Add(key, value) - // There are cases where multiple key-values (leafs) are going to be added to a -// Tree, for these cases is more effitient to use: +// Tree, for these cases is more efficient to use: invalids, err := tree.AddBatch(keys, values) // generate the merkle proof of a leaf by it's key diff --git a/go.mod b/go.mod index e88897a..c01329b 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/arnaucube/arbo +module github.com/vocdoni/arbo go 1.16 diff --git a/tree.go b/tree.go index 2acd57b..843f4f8 100644 --- a/tree.go +++ b/tree.go @@ -299,7 +299,7 @@ func (t *Tree) down(newKey, currKey []byte, siblings [][]byte, " should avoid reaching this point. This panic is temporary" + " for reporting purposes, will be deleted in future versions." + " Please paste this log (including the previous lines) in a" + - " new issue: https://github.com/arnaucube/arbo/issues/new") // TMP + " new issue: https://github.com/vocdoni/arbo/issues/new") // TMP case PrefixValueLeaf: // leaf if !bytes.Equal(currValue, emptyValue) { if getLeaf {