diff options
author | Paweł Bylica <chfast@gmail.com> | 2014-12-11 06:42:01 +0800 |
---|---|---|
committer | Paweł Bylica <chfast@gmail.com> | 2014-12-11 06:42:01 +0800 |
commit | 3ba2d4195fa4d5fd9565345bec34f6aeeae4bb7e (patch) | |
tree | 936bf612313a66f93256a7ed816fa2fe411a1c53 /createRandomTest.cpp | |
parent | ebffc7979c39ad3d0ff41db1976d4e1572b04f13 (diff) | |
parent | 1d85b074c85ec82175a4e8cab723791b63e6b6db (diff) | |
download | dexon-solidity-3ba2d4195fa4d5fd9565345bec34f6aeeae4bb7e.tar.gz dexon-solidity-3ba2d4195fa4d5fd9565345bec34f6aeeae4bb7e.tar.zst dexon-solidity-3ba2d4195fa4d5fd9565345bec34f6aeeae4bb7e.zip |
Merge remote-tracking branch 'origin/vm' into develop-evmcc
Conflicts:
libethereum/Executive.cpp
libethereum/Executive.h
libethereum/State.cpp
libevm/VM.cpp
libevm/VM.h
libevm/VMFace.h
test/createRandomTest.cpp
test/vm.cpp
windows/LibEthereum.vcxproj.filters
Diffstat (limited to 'createRandomTest.cpp')
-rw-r--r-- | createRandomTest.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/createRandomTest.cpp b/createRandomTest.cpp index a01eec65..1af12f64 100644 --- a/createRandomTest.cpp +++ b/createRandomTest.cpp @@ -31,9 +31,8 @@ #include <json_spirit/json_spirit_writer_template.h> #include <libdevcore/CommonIO.h> #include <libdevcore/CommonData.h> -#include <libethereum/VMFactory.h> #include <libevmcore/Instruction.h> -#include <libevm/VM.h> +#include <libevm/VMFactory.h> #include "vm.h" using namespace std; @@ -129,9 +128,6 @@ void doMyTests(json_spirit::mValue& v) assert(o.count("pre") > 0); assert(o.count("exec") > 0); - - auto vmObj = eth::VMFactory::create(eth::VMFactory::Interpreter); - auto& vm = *vmObj; dev::test::FakeExtVM fev; fev.importEnv(o["env"].get_obj()); fev.importState(o["pre"].get_obj()); @@ -145,14 +141,15 @@ void doMyTests(json_spirit::mValue& v) fev.code = fev.thisTxCode; } - vm.reset(fev.gas); bytes output; + auto vm = eth::VMFactory::create(fev.gas); + u256 gas; bool vmExceptionOccured = false; try { - output = vm.go(fev, fev.simpleTrace()).toBytes(); - gas = vm.gas(); + output = vm->go(fev, fev.simpleTrace()).toBytes(); + gas = vm->gas(); } catch (eth::VMException const& _e) { @@ -192,7 +189,7 @@ void doMyTests(json_spirit::mValue& v) o["callcreates"] = fev.exportCallCreates(); o["out"] = "0x" + toHex(output); fev.push(o, "gas", gas); - o["logs"] = mValue(test::exportLog(fev.sub.logs)); + o["logs"] = test::exportLog(fev.sub.logs); } } } |