diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-06-19 04:38:17 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-06-19 04:38:17 +0800 |
commit | 8d3faf69d00420b80d4d737e618b2c7791c10ae9 (patch) | |
tree | 4d679f2abf30bd948c46719dd7220a91294f8a27 /tests/state_test_util.go | |
parent | baea8e87e5dfdcfb7b2fdcef48fa6038d60a6f9c (diff) | |
download | dexon-8d3faf69d00420b80d4d737e618b2c7791c10ae9.tar dexon-8d3faf69d00420b80d4d737e618b2c7791c10ae9.tar.gz dexon-8d3faf69d00420b80d4d737e618b2c7791c10ae9.tar.bz2 dexon-8d3faf69d00420b80d4d737e618b2c7791c10ae9.tar.lz dexon-8d3faf69d00420b80d4d737e618b2c7791c10ae9.tar.xz dexon-8d3faf69d00420b80d4d737e618b2c7791c10ae9.tar.zst dexon-8d3faf69d00420b80d4d737e618b2c7791c10ae9.zip |
Build error fixes
Diffstat (limited to 'tests/state_test_util.go')
-rw-r--r-- | tests/state_test_util.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/state_test_util.go b/tests/state_test_util.go index ad3aeea6c..835ba44f4 100644 --- a/tests/state_test_util.go +++ b/tests/state_test_util.go @@ -121,17 +121,16 @@ func runStateTest(test VmTest) error { } for addr, value := range account.Storage { - v := obj.GetState(common.HexToHash(addr)).Bytes() - vexp := common.FromHex(value) + v := obj.GetState(common.HexToHash(addr)) + vexp := common.HexToHash(value) - if bytes.Compare(v, vexp) != 0 { - return fmt.Errorf("(%x: %s) storage failed. Expected %x, got %x (%v %v)\n", obj.Address().Bytes()[0:4], addr, vexp, v, common.BigD(vexp), common.BigD(v)) + if v != vexp { + return fmt.Errorf("(%x: %s) storage failed. Expected %x, got %x (%v %v)\n", obj.Address().Bytes()[0:4], addr, vexp, v, vexp.Big(), v.Big()) } } } statedb.Sync() - //if !bytes.Equal(common.Hex2Bytes(test.PostStateRoot), statedb.Root()) { if common.HexToHash(test.PostStateRoot) != statedb.Root() { return fmt.Errorf("Post state root error. Expected %s, got %x", test.PostStateRoot, statedb.Root()) } |