Changed context and ADDMOD, MULMOD

* Cleaned up VM execution. VM run now takes a context
* ADDMOD/MULMOD - removed incorrect cast
This commit is contained in:
obscuren
2015-03-13 13:44:15 +01:00
parent 80592f244d
commit f76cc6699e
6 changed files with 44 additions and 24 deletions

View File

@@ -116,7 +116,6 @@ func RunVmTest(p string, t *testing.T) {
} else {
ret, logs, gas, err = helper.RunState(statedb, env, test.Transaction)
}
statedb.Sync()
rexp := helper.FromHex(test.Out)
if bytes.Compare(rexp, ret) != 0 {
@@ -157,6 +156,7 @@ func RunVmTest(p string, t *testing.T) {
}
if !isVmTest {
statedb.Sync()
if !bytes.Equal(ethutil.Hex2Bytes(test.PostStateRoot), statedb.Root()) {
t.Errorf("%s's : Post state root error. Expected %s, got %x", name, test.PostStateRoot, statedb.Root())
}