diff --git a/createRandomTest.cpp b/createRandomTest.cpp
index 1647ce810..a01eec65c 100644
--- a/createRandomTest.cpp
+++ b/createRandomTest.cpp
@@ -1,18 +1,18 @@
/*
- This file is part of cpp-ethereum.
+ This file is part of cpp-ethereum.
- cpp-ethereum is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
+ cpp-ethereum is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
- cpp-ethereum is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ cpp-ethereum is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with cpp-ethereum. If not, see .
+ You should have received a copy of the GNU General Public License
+ along with cpp-ethereum. If not, see .
*/
/** @file createRandomTest.cpp
* @author Christoph Jentzsch
@@ -31,6 +31,7 @@
#include
#include
#include
+#include
#include
#include
#include "vm.h"
@@ -128,6 +129,9 @@ 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());
@@ -141,9 +145,8 @@ void doMyTests(json_spirit::mValue& v)
fev.code = fev.thisTxCode;
}
+ vm.reset(fev.gas);
bytes output;
- eth::VM vm(fev.gas);
-
u256 gas;
bool vmExceptionOccured = false;
try