diff options
Diffstat (limited to 'tests/vm_test_util.go')
-rw-r--r-- | tests/vm_test_util.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/vm_test_util.go b/tests/vm_test_util.go index 1edf0e425..3b7ba9b31 100644 --- a/tests/vm_test_util.go +++ b/tests/vm_test_util.go @@ -187,16 +187,16 @@ func runVmTest(test VmTest) error { } // check post state - for addr, account := range test.Post { - obj := statedb.GetStateObject(common.HexToAddress(addr)) - if obj == nil { + for address, account := range test.Post { + accountAddr := common.HexToAddress(address) + if !statedb.Exist(accountAddr) { continue } for addr, value := range account.Storage { - v := statedb.GetState(obj.Address(), common.HexToHash(addr)) + v := statedb.GetState(accountAddr, common.HexToHash(addr)) vexp := common.HexToHash(value) 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()) + return fmt.Errorf("(%x: %s) storage failed. Expected %x, got %x (%v %v)\n", addr[:4], addr, vexp, v, vexp.Big(), v.Big()) } } } |