good morning!!!!

Skip to content
Snippets Groups Projects
Commit 4ea93eba authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

Updated tests

parent 44900e36
Branches
Tags
No related merge requests found
package main
import (
"github.com/ethereum/ethutil-go"
"math/big"
"testing"
)
func BenchmarkDaggerSearch(b *testing.B) {
hash := big.NewInt(0)
diff := BigPow(2, 36)
diff := ethutil.BigPow(2, 36)
o := big.NewInt(0) // nonce doesn't matter. We're only testing against speed, not validity
// Reset timer so the big generation isn't included in the benchmark
......
......@@ -3,6 +3,8 @@ package main
import (
"encoding/hex"
_ "fmt"
"github.com/ethereum/ethdb-go"
"github.com/ethereum/ethutil-go"
"testing"
)
......@@ -15,8 +17,8 @@ var testsource = `{"Inputs":{
}`
func TestTestRunner(t *testing.T) {
db, _ := NewMemDatabase()
trie := NewTrie(db, "")
db, _ := ethdb.NewMemDatabase()
trie := ethutil.NewTrie(db, "")
runner := NewTestRunner(t)
runner.RunFromString(testsource, func(source *TestSource) {
......@@ -24,7 +26,7 @@ func TestTestRunner(t *testing.T) {
trie.Update(key, value)
}
if hex.EncodeToString([]byte(trie.root)) != source.Expectation {
if hex.EncodeToString([]byte(trie.Root)) != source.Expectation {
t.Error("trie root did not match")
}
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment