Fixed tests for 'types'

This commit is contained in:
obscuren 2014-11-18 19:52:45 +01:00
parent 675ba4d7eb
commit 93e693be72
4 changed files with 7 additions and 5 deletions

View File

@ -4,6 +4,7 @@ import (
"container/list"
"fmt"
"github.com/ethereum/go-ethereum/chain/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/ethutil"
@ -19,7 +20,7 @@ type TestManager struct {
db ethutil.Database
txPool *TxPool
blockChain *ChainManager
Blocks []*Block
Blocks []*types.Block
}
func (s *TestManager) IsListening() bool {

View File

@ -21,8 +21,7 @@ import (
"fmt"
"os"
"runtime"
"github.com/ethereum/go-ethereum/chain"
"github.com/ethereum/go-ethereum/chain/types"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/logger"
@ -74,7 +73,7 @@ func main() {
ethereum := utils.NewEthereum(db, clientIdentity, keyManager, UseUPnP, OutboundPort, MaxPeer)
if Dump {
var block *chain.Block
var block *types.Block
if len(DumpHash) == 0 && DumpNumber == -1 {
block = ethereum.ChainManager().CurrentBlock

View File

@ -132,7 +132,7 @@ func BenchmarkUpdate(b *testing.B) {
b.ResetTimer()
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()
}

View File

@ -1,12 +1,14 @@
package trie
import (
"bytes"
"encoding/hex"
"encoding/json"
"fmt"
"io/ioutil"
"math/rand"
"net/http"
"testing"
"time"
checker "gopkg.in/check.v1"