aboutsummaryrefslogtreecommitdiffstats
path: root/tests/vm_test_util.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2017-02-23 06:29:59 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-02-23 06:29:59 +0800
commit024d41d0c2660d8f1dfbeb14921c7109e30493a2 (patch)
treea2b4ed630b84084c7f439d1539ed0551ec729cbd /tests/vm_test_util.go
parent46ec4357e73dd0c43951d11638d9aed94f8ffd29 (diff)
downloadgo-tangerine-024d41d0c2660d8f1dfbeb14921c7109e30493a2.tar
go-tangerine-024d41d0c2660d8f1dfbeb14921c7109e30493a2.tar.gz
go-tangerine-024d41d0c2660d8f1dfbeb14921c7109e30493a2.tar.bz2
go-tangerine-024d41d0c2660d8f1dfbeb14921c7109e30493a2.tar.lz
go-tangerine-024d41d0c2660d8f1dfbeb14921c7109e30493a2.tar.xz
go-tangerine-024d41d0c2660d8f1dfbeb14921c7109e30493a2.tar.zst
go-tangerine-024d41d0c2660d8f1dfbeb14921c7109e30493a2.zip
core, core/state, core/vm: remove exported account getters (#3618)
Removed exported statedb object accessors, reducing the chance for nasty bugs to creep in. It's also ugly and unnecessary to have these methods.
Diffstat (limited to 'tests/vm_test_util.go')
-rw-r--r--tests/vm_test_util.go10
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())
}
}
}