diff options
author | kiel barry <kiel.j.barry@gmail.com> | 2018-05-22 04:41:31 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-05-22 04:41:31 +0800 |
commit | 0fe47e98c4d93f952dc7415f401fd03b2664a21d (patch) | |
tree | ae30e450e853fe8a03760496b87259077a760e68 /trie/proof_test.go | |
parent | 415969f534d8122e717e18abafdc8ec7bb913a84 (diff) | |
download | go-tangerine-0fe47e98c4d93f952dc7415f401fd03b2664a21d.tar go-tangerine-0fe47e98c4d93f952dc7415f401fd03b2664a21d.tar.gz go-tangerine-0fe47e98c4d93f952dc7415f401fd03b2664a21d.tar.bz2 go-tangerine-0fe47e98c4d93f952dc7415f401fd03b2664a21d.tar.lz go-tangerine-0fe47e98c4d93f952dc7415f401fd03b2664a21d.tar.xz go-tangerine-0fe47e98c4d93f952dc7415f401fd03b2664a21d.tar.zst go-tangerine-0fe47e98c4d93f952dc7415f401fd03b2664a21d.zip |
trie: fixes to comply with golint (#16771)
Diffstat (limited to 'trie/proof_test.go')
-rw-r--r-- | trie/proof_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/trie/proof_test.go b/trie/proof_test.go index a3537787c..dee6f7d85 100644 --- a/trie/proof_test.go +++ b/trie/proof_test.go @@ -40,7 +40,7 @@ func TestProof(t *testing.T) { if trie.Prove(kv.k, 0, proofs) != nil { t.Fatalf("missing key %x while constructing proof", kv.k) } - val, err, _ := VerifyProof(root, kv.k, proofs) + val, _, err := VerifyProof(root, kv.k, proofs) if err != nil { t.Fatalf("VerifyProof error for key %x: %v\nraw proof: %v", kv.k, err, proofs) } @@ -58,7 +58,7 @@ func TestOneElementProof(t *testing.T) { if len(proofs.Keys()) != 1 { t.Error("proof should have one element") } - val, err, _ := VerifyProof(trie.Hash(), []byte("k"), proofs) + val, _, err := VerifyProof(trie.Hash(), []byte("k"), proofs) if err != nil { t.Fatalf("VerifyProof error: %v\nproof hashes: %v", err, proofs.Keys()) } @@ -82,7 +82,7 @@ func TestVerifyBadProof(t *testing.T) { proofs.Delete(key) mutateByte(node) proofs.Put(crypto.Keccak256(node), node) - if _, err, _ := VerifyProof(root, kv.k, proofs); err == nil { + if _, _, err := VerifyProof(root, kv.k, proofs); err == nil { t.Fatalf("expected proof to fail for key %x", kv.k) } } @@ -131,7 +131,7 @@ func BenchmarkVerifyProof(b *testing.B) { b.ResetTimer() for i := 0; i < b.N; i++ { im := i % len(keys) - if _, err, _ := VerifyProof(root, []byte(keys[im]), proofs[im]); err != nil { + if _, _, err := VerifyProof(root, []byte(keys[im]), proofs[im]); err != nil { b.Fatalf("key %x: %v", keys[im], err) } } |