aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-06-17 17:24:40 +0800
committerobscuren <geffobscura@gmail.com>2015-06-17 17:24:40 +0800
commit787a61bb27b9f51f4af67c69eb8f1c5869ae3144 (patch)
tree33405ad345b4350940eb163339c5a5de711bfc6e /tests
parent5721fcf668f8ab798b6602dc6ff88726bf0c8f86 (diff)
downloadgo-tangerine-787a61bb27b9f51f4af67c69eb8f1c5869ae3144.tar
go-tangerine-787a61bb27b9f51f4af67c69eb8f1c5869ae3144.tar.gz
go-tangerine-787a61bb27b9f51f4af67c69eb8f1c5869ae3144.tar.bz2
go-tangerine-787a61bb27b9f51f4af67c69eb8f1c5869ae3144.tar.lz
go-tangerine-787a61bb27b9f51f4af67c69eb8f1c5869ae3144.tar.xz
go-tangerine-787a61bb27b9f51f4af67c69eb8f1c5869ae3144.tar.zst
go-tangerine-787a61bb27b9f51f4af67c69eb8f1c5869ae3144.zip
core/state, core/vm: reworked storage get / set to use common.Hash
Diffstat (limited to 'tests')
-rw-r--r--tests/vm/gh_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/vm/gh_test.go b/tests/vm/gh_test.go
index a95d02576..be9e89d9c 100644
--- a/tests/vm/gh_test.go
+++ b/tests/vm/gh_test.go
@@ -97,7 +97,7 @@ func RunVmTest(p string, t *testing.T) {
obj := StateObjectFromAccount(db, addr, account)
statedb.SetStateObject(obj)
for a, v := range account.Storage {
- obj.SetState(common.HexToHash(a), common.NewValue(helper.FromHex(v)))
+ obj.SetState(common.HexToHash(a), common.HexToHash(v))
}
}
@@ -168,11 +168,11 @@ func RunVmTest(p string, t *testing.T) {
}
for addr, value := range account.Storage {
- v := obj.GetState(common.HexToHash(addr)).Bytes()
- vexp := helper.FromHex(value)
+ v := obj.GetState(common.HexToHash(addr))
+ vexp := common.HexToHash(value)
- if bytes.Compare(v, vexp) != 0 {
- t.Errorf("%s's : (%x: %s) storage failed. Expected %x, got %x (%v %v)\n", name, obj.Address().Bytes()[0:4], addr, vexp, v, common.BigD(vexp), common.BigD(v))
+ if v != vexp {
+ t.Errorf("%s's : (%x: %s) storage failed. Expected %x, got %x (%v %v)\n", name, obj.Address().Bytes()[0:4], addr, vexp, v, vexp.Big(), v.Big())
}
}
}