diff options
Diffstat (limited to 'core/state/statedb_test.go')
-rw-r--r-- | core/state/statedb_test.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/state/statedb_test.go b/core/state/statedb_test.go index 874317300..597de3be5 100644 --- a/core/state/statedb_test.go +++ b/core/state/statedb_test.go @@ -331,12 +331,11 @@ func (test *snapshotTest) checkEqual(state, checkstate *StateDB) error { checkeq("GetCodeHash", state.GetCodeHash(addr), checkstate.GetCodeHash(addr)) checkeq("GetCodeSize", state.GetCodeSize(addr), checkstate.GetCodeSize(addr)) // Check storage. - if obj := state.GetStateObject(addr); obj != nil { - obj.ForEachStorage(func(key, val common.Hash) bool { + if obj := state.getStateObject(addr); obj != nil { + state.ForEachStorage(addr, func(key, val common.Hash) bool { return checkeq("GetState("+key.Hex()+")", val, checkstate.GetState(addr, key)) }) - checkobj := checkstate.GetStateObject(addr) - checkobj.ForEachStorage(func(key, checkval common.Hash) bool { + checkstate.ForEachStorage(addr, func(key, checkval common.Hash) bool { return checkeq("GetState("+key.Hex()+")", state.GetState(addr, key), checkval) }) } |