aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-18 18:44:25 +0800
committerobscuren <geffobscura@gmail.com>2015-03-18 18:44:25 +0800
commit942980609fb8a36873689bd3bd0a15488f327d56 (patch)
treed9de01873dc04c4e4042cf1260fe180d01f259bb /tests
parentcd52ef315cf4d65cfb5282f72d795849266e3ab5 (diff)
downloaddexon-942980609fb8a36873689bd3bd0a15488f327d56.tar
dexon-942980609fb8a36873689bd3bd0a15488f327d56.tar.gz
dexon-942980609fb8a36873689bd3bd0a15488f327d56.tar.bz2
dexon-942980609fb8a36873689bd3bd0a15488f327d56.tar.lz
dexon-942980609fb8a36873689bd3bd0a15488f327d56.tar.xz
dexon-942980609fb8a36873689bd3bd0a15488f327d56.tar.zst
dexon-942980609fb8a36873689bd3bd0a15488f327d56.zip
conversions
Diffstat (limited to 'tests')
-rw-r--r--tests/blocktest.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/blocktest.go b/tests/blocktest.go
index e4d001089..44b459c8d 100644
--- a/tests/blocktest.go
+++ b/tests/blocktest.go
@@ -13,7 +13,6 @@ import (
"strings"
"github.com/ethereum/go-ethereum/common"
- "github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/state"
@@ -99,7 +98,7 @@ func LoadBlockTests(file string) (map[string]*BlockTest, error) {
// InsertPreState populates the given database with the genesis
// accounts defined by the test.
func (t *BlockTest) InsertPreState(db common.Database) error {
- statedb := state.New(nil, db)
+ statedb := state.New(common.Hash{}, db)
for addrString, acct := range t.preAccounts {
// XXX: is is worth it checking for errors here?
//addr, _ := hex.DecodeString(addrString)
@@ -120,7 +119,7 @@ func (t *BlockTest) InsertPreState(db common.Database) error {
// sync trie to disk
statedb.Sync()
- if !bytes.Equal(t.Genesis.Root().Bytes(), statedb.Root()) {
+ if t.Genesis.Root() != statedb.Root() {
return errors.New("computed state root does not match genesis block")
}
return nil
@@ -212,12 +211,12 @@ func mustConvertAddress(in string) common.Address {
return common.BytesToAddress(out)
}
-func mustConvertBloom(in string) core.Bloom {
+func mustConvertBloom(in string) types.Bloom {
out, err := hex.DecodeString(strings.TrimPrefix(in, "0x"))
if err != nil {
panic(fmt.Errorf("invalid hex: %q", in))
}
- return core.BytesToBloom(out)
+ return types.BytesToBloom(out)
}
func mustConvertBigInt10(in string) *big.Int {