aboutsummaryrefslogtreecommitdiffstats
path: root/vm.cpp
diff options
context:
space:
mode:
authorCJentzsch <jentzsch.software@gmail.com>2015-04-06 16:20:58 +0800
committerCJentzsch <jentzsch.software@gmail.com>2015-04-06 16:20:58 +0800
commitb9ace5452ea869418c350d632f7e23fa83d6ff75 (patch)
tree21b9af6219b11f7b696dca486753d76bc0df1892 /vm.cpp
parent8921dc0de43536cf94c43647282fb379a57888e9 (diff)
parentac32ee3ec7f960f80442b00e55455661fa94572d (diff)
downloaddexon-solidity-b9ace5452ea869418c350d632f7e23fa83d6ff75.tar
dexon-solidity-b9ace5452ea869418c350d632f7e23fa83d6ff75.tar.gz
dexon-solidity-b9ace5452ea869418c350d632f7e23fa83d6ff75.tar.bz2
dexon-solidity-b9ace5452ea869418c350d632f7e23fa83d6ff75.tar.lz
dexon-solidity-b9ace5452ea869418c350d632f7e23fa83d6ff75.tar.xz
dexon-solidity-b9ace5452ea869418c350d632f7e23fa83d6ff75.tar.zst
dexon-solidity-b9ace5452ea869418c350d632f7e23fa83d6ff75.zip
Merge remote-tracking branch 'upstream/develop' into addTests
Diffstat (limited to 'vm.cpp')
-rw-r--r--vm.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/vm.cpp b/vm.cpp
index 2bdafb27..ff890352 100644
--- a/vm.cpp
+++ b/vm.cpp
@@ -25,7 +25,6 @@
#include <libethereum/Executive.h>
#include <libevm/VMFactory.h>
#include "vm.h"
-#include "Stats.h"
using namespace std;
using namespace json_spirit;
@@ -97,7 +96,7 @@ void FakeExtVM::push(mArray& a, u256 _v)
mObject FakeExtVM::exportEnv()
{
mObject ret;
- ret["previousHash"] = toString(previousBlock.hash);
+ ret["previousHash"] = toString(currentBlock.parentHash);
push(ret, "currentDifficulty", currentBlock.difficulty);
push(ret, "currentTimestamp", currentBlock.timestamp);
ret["currentCoinbase"] = toString(currentBlock.coinbaseAddress);
@@ -116,7 +115,7 @@ void FakeExtVM::importEnv(mObject& _o)
assert(_o.count("currentCoinbase") > 0);
assert(_o.count("currentNumber") > 0);
- previousBlock.hash = h256(_o["previousHash"].get_str());
+ currentBlock.parentHash = h256(_o["previousHash"].get_str());
currentBlock.number = toInt(_o["currentNumber"]);
lastHashes = test::lastHashes(currentBlock.number);
currentBlock.gasLimit = toInt(_o["currentGasLimit"]);
@@ -311,9 +310,6 @@ namespace dev { namespace test {
void doVMTests(json_spirit::mValue& v, bool _fillin)
{
- if (Options::get().stats)
- Listener::registerListener(Stats::get());
-
for (auto& i: v.get_obj())
{
std::cout << " " << i.first << "\n";
@@ -549,6 +545,7 @@ BOOST_AUTO_TEST_CASE(vmRandom)
string s = asString(dev::contents(path.string()));
BOOST_REQUIRE_MESSAGE(s.length() > 0, "Content of " + path.string() + " is empty. Have you cloned the 'tests' repo branch develop and set ETHEREUM_TEST_PATH to its path?");
json_spirit::read_string(s, v);
+ test::Listener::notifySuiteStarted(path.filename().string());
doVMTests(v, false);
}
catch (Exception const& _e)