aboutsummaryrefslogtreecommitdiffstats
path: root/trie/proof_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'trie/proof_test.go')
-rw-r--r--trie/proof_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/trie/proof_test.go b/trie/proof_test.go
index fff313d7f..a3537787c 100644
--- a/trie/proof_test.go
+++ b/trie/proof_test.go
@@ -36,7 +36,7 @@ func TestProof(t *testing.T) {
trie, vals := randomTrie(500)
root := trie.Hash()
for _, kv := range vals {
- proofs, _ := ethdb.NewMemDatabase()
+ proofs := ethdb.NewMemDatabase()
if trie.Prove(kv.k, 0, proofs) != nil {
t.Fatalf("missing key %x while constructing proof", kv.k)
}
@@ -53,7 +53,7 @@ func TestProof(t *testing.T) {
func TestOneElementProof(t *testing.T) {
trie := new(Trie)
updateString(trie, "k", "v")
- proofs, _ := ethdb.NewMemDatabase()
+ proofs := ethdb.NewMemDatabase()
trie.Prove([]byte("k"), 0, proofs)
if len(proofs.Keys()) != 1 {
t.Error("proof should have one element")
@@ -71,7 +71,7 @@ func TestVerifyBadProof(t *testing.T) {
trie, vals := randomTrie(800)
root := trie.Hash()
for _, kv := range vals {
- proofs, _ := ethdb.NewMemDatabase()
+ proofs := ethdb.NewMemDatabase()
trie.Prove(kv.k, 0, proofs)
if len(proofs.Keys()) == 0 {
t.Fatal("zero length proof")
@@ -109,7 +109,7 @@ func BenchmarkProve(b *testing.B) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
kv := vals[keys[i%len(keys)]]
- proofs, _ := ethdb.NewMemDatabase()
+ proofs := ethdb.NewMemDatabase()
if trie.Prove(kv.k, 0, proofs); len(proofs.Keys()) == 0 {
b.Fatalf("zero length proof for %x", kv.k)
}
@@ -123,7 +123,7 @@ func BenchmarkVerifyProof(b *testing.B) {
var proofs []*ethdb.MemDatabase
for k := range vals {
keys = append(keys, k)
- proof, _ := ethdb.NewMemDatabase()
+ proof := ethdb.NewMemDatabase()
trie.Prove([]byte(k), 0, proof)
proofs = append(proofs, proof)
}