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 /TestHelper.cpp | |
parent | ebffc7979c39ad3d0ff41db1976d4e1572b04f13 (diff) | |
parent | 1d85b074c85ec82175a4e8cab723791b63e6b6db (diff) | |
download | dexon-solidity-3ba2d4195fa4d5fd9565345bec34f6aeeae4bb7e.tar dexon-solidity-3ba2d4195fa4d5fd9565345bec34f6aeeae4bb7e.tar.gz dexon-solidity-3ba2d4195fa4d5fd9565345bec34f6aeeae4bb7e.tar.bz2 dexon-solidity-3ba2d4195fa4d5fd9565345bec34f6aeeae4bb7e.tar.lz dexon-solidity-3ba2d4195fa4d5fd9565345bec34f6aeeae4bb7e.tar.xz 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 'TestHelper.cpp')
-rw-r--r-- | TestHelper.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/TestHelper.cpp b/TestHelper.cpp index 1ece875e..b0935d0b 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -72,7 +72,7 @@ ImportTest::ImportTest(json_spirit::mObject& _o, bool isFiller): m_TestObject(_o if (!isFiller) { importState(_o["post"].get_obj(), m_statePost); - m_environment.sub.logs = importLog(_o["logs"].get_obj()); + m_environment.sub.logs = importLog(_o["logs"].get_array()); } } @@ -259,16 +259,17 @@ bytes importCode(json_spirit::mObject& _o) return code; } -LogEntries importLog(json_spirit::mObject& _o) +LogEntries importLog(json_spirit::mArray& _a) { LogEntries logEntries; - for (auto const& l: _o) + for (auto const& l: _a) { - json_spirit::mObject o = l.second.get_obj(); + json_spirit::mObject o = l.get_obj(); // cant use BOOST_REQUIRE, because this function is used outside boost test (createRandomTest) assert(o.count("address") > 0); assert(o.count("topics") > 0); assert(o.count("data") > 0); + assert(o.count("bloom") > 0); LogEntry log; log.address = Address(o["address"].get_str()); for (auto const& t: o["topics"].get_array()) @@ -279,9 +280,9 @@ LogEntries importLog(json_spirit::mObject& _o) return logEntries; } -json_spirit::mObject exportLog(eth::LogEntries _logs) +json_spirit::mArray exportLog(eth::LogEntries _logs) { - json_spirit::mObject ret; + json_spirit::mArray ret; if (_logs.size() == 0) return ret; for (LogEntry const& l: _logs) { @@ -292,7 +293,8 @@ json_spirit::mObject exportLog(eth::LogEntries _logs) topics.push_back(toString(t)); o["topics"] = topics; o["data"] = "0x" + toHex(l.data); - ret[toString(l.bloom())] = o; + o["bloom"] = toString(l.bloom()); + ret.push_back(o); } return ret; } |