aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Simonsson <gustav.simonsson@gmail.com>2015-03-22 03:29:12 +0800
committerGustav Simonsson <gustav.simonsson@gmail.com>2015-03-23 23:32:20 +0800
commit5d31a475e93807fb1b3a71765fe66138cacd15e7 (patch)
tree58563afc13ced0528f60164e5a4f273a01f846dd
parent60de4d6dd1403abd4daa142bb2e43cb917fe7b15 (diff)
downloaddexon-5d31a475e93807fb1b3a71765fe66138cacd15e7.tar
dexon-5d31a475e93807fb1b3a71765fe66138cacd15e7.tar.gz
dexon-5d31a475e93807fb1b3a71765fe66138cacd15e7.tar.bz2
dexon-5d31a475e93807fb1b3a71765fe66138cacd15e7.tar.lz
dexon-5d31a475e93807fb1b3a71765fe66138cacd15e7.tar.xz
dexon-5d31a475e93807fb1b3a71765fe66138cacd15e7.tar.zst
dexon-5d31a475e93807fb1b3a71765fe66138cacd15e7.zip
Fix new types for blocktests and comment out non-working log level setter
-rw-r--r--cmd/ethtest/main.go2
-rw-r--r--tests/blocktest.go8
2 files changed, 5 insertions, 5 deletions
diff --git a/cmd/ethtest/main.go b/cmd/ethtest/main.go
index f2f7d27f3..fdf573fd8 100644
--- a/cmd/ethtest/main.go
+++ b/cmd/ethtest/main.go
@@ -219,7 +219,7 @@ func RunVmTest(r io.Reader) (failed int) {
}
func main() {
- helper.Logger.SetLogLevel(5)
+ //helper.Logger.SetLogLevel(5)
vm.Debug = true
if len(os.Args) > 1 {
diff --git a/tests/blocktest.go b/tests/blocktest.go
index 2ce27cc38..5719a835b 100644
--- a/tests/blocktest.go
+++ b/tests/blocktest.go
@@ -119,7 +119,7 @@ func (t *BlockTest) InsertPreState(db common.Database) (*state.StateDB, error) {
// sync trie to disk
statedb.Sync()
- if !bytes.Equal(t.Genesis.Root(), statedb.Root()) {
+ if !bytes.Equal(t.Genesis.Root().Bytes(), statedb.Root().Bytes()) {
return nil, errors.New("computed state root does not match genesis block")
}
return statedb, nil
@@ -134,9 +134,9 @@ func (t *BlockTest) ValidatePostState(statedb *state.StateDB) error {
nonce, _ := strconv.ParseUint(acct.Nonce, 16, 64)
// address is indirectly verified by the other fields, as it's the db key
- code2 := statedb.GetCode(addr)
- balance2 := statedb.GetBalance(addr)
- nonce2 := statedb.GetNonce(addr)
+ code2 := statedb.GetCode(common.BytesToAddress(addr))
+ balance2 := statedb.GetBalance(common.BytesToAddress(addr))
+ nonce2 := statedb.GetNonce(common.BytesToAddress(addr))
if !bytes.Equal(code2, code) {
return fmt.Errorf("account code mismatch, addr, found, expected: ", addrString, hex.EncodeToString(code2), hex.EncodeToString(code))
}