Commit 93e693be authored by obscuren's avatar obscuren

Fixed tests for 'types'

parent 675ba4d7
...@@ -4,6 +4,7 @@ import ( ...@@ -4,6 +4,7 @@ import (
"container/list" "container/list"
"fmt" "fmt"
"github.com/ethereum/go-ethereum/chain/types"
"github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/ethutil"
...@@ -19,7 +20,7 @@ type TestManager struct { ...@@ -19,7 +20,7 @@ type TestManager struct {
db ethutil.Database db ethutil.Database
txPool *TxPool txPool *TxPool
blockChain *ChainManager blockChain *ChainManager
Blocks []*Block Blocks []*types.Block
} }
func (s *TestManager) IsListening() bool { func (s *TestManager) IsListening() bool {
......
...@@ -21,8 +21,7 @@ import ( ...@@ -21,8 +21,7 @@ import (
"fmt" "fmt"
"os" "os"
"runtime" "runtime"
"github.com/ethereum/go-ethereum/chain/types"
"github.com/ethereum/go-ethereum/chain"
"github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger"
...@@ -74,7 +73,7 @@ func main() { ...@@ -74,7 +73,7 @@ func main() {
ethereum := utils.NewEthereum(db, clientIdentity, keyManager, UseUPnP, OutboundPort, MaxPeer) ethereum := utils.NewEthereum(db, clientIdentity, keyManager, UseUPnP, OutboundPort, MaxPeer)
if Dump { if Dump {
var block *chain.Block var block *types.Block
if len(DumpHash) == 0 && DumpNumber == -1 { if len(DumpHash) == 0 && DumpNumber == -1 {
block = ethereum.ChainManager().CurrentBlock block = ethereum.ChainManager().CurrentBlock
......
...@@ -132,7 +132,7 @@ func BenchmarkUpdate(b *testing.B) { ...@@ -132,7 +132,7 @@ func BenchmarkUpdate(b *testing.B) {
b.ResetTimer() b.ResetTimer()
for i := 0; i < b.N; i++ { for i := 0; i < b.N; i++ {
trie.UpdateString(fmt.Sprintf("aaaaaaaaa%d", base, i), "value") trie.UpdateString(fmt.Sprintf("aaaaaaaaa%d", i), "value")
} }
trie.Hash() trie.Hash()
} }
......
package trie package trie
import ( import (
"bytes"
"encoding/hex" "encoding/hex"
"encoding/json" "encoding/json"
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"math/rand" "math/rand"
"net/http" "net/http"
"testing"
"time" "time"
checker "gopkg.in/check.v1" checker "gopkg.in/check.v1"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment