diff options
author | subtly <subtly@users.noreply.github.com> | 2015-01-15 01:51:10 +0800 |
---|---|---|
committer | subtly <subtly@users.noreply.github.com> | 2015-01-15 01:51:10 +0800 |
commit | 2a268524732020b8175f0d1ea450a9724f07cc8e (patch) | |
tree | b9e0a438ddeb94385a2458f6f15142027d8d0590 /vm.cpp | |
parent | 01ecadd74ed5740aca1fd1a4654a007c7a8a8b73 (diff) | |
parent | 25fc28422bf864f5299a5995e68fa1c17d2cb75c (diff) | |
download | dexon-solidity-2a268524732020b8175f0d1ea450a9724f07cc8e.tar.gz dexon-solidity-2a268524732020b8175f0d1ea450a9724f07cc8e.tar.zst dexon-solidity-2a268524732020b8175f0d1ea450a9724f07cc8e.zip |
Merge branch 'develop' into p2p
Conflicts:
libp2p/Host.cpp
libwebthree/WebThree.h
Diffstat (limited to 'vm.cpp')
-rw-r--r-- | vm.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -232,13 +232,13 @@ void FakeExtVM::importCallCreates(mArray& _callcreates) for (mValue& v: _callcreates) { auto tx = v.get_obj(); - BOOST_REQUIRE(tx.count("data") > 0); - BOOST_REQUIRE(tx.count("value") > 0); - BOOST_REQUIRE(tx.count("destination") > 0); - BOOST_REQUIRE(tx.count("gasLimit") > 0); + assert(tx.count("data") > 0); + assert(tx.count("value") > 0); + assert(tx.count("destination") > 0); + assert(tx.count("gasLimit") > 0); Transaction t = tx["destination"].get_str().empty() ? - Transaction(toInt(tx["value"]), 0, toInt(tx["gasLimit"]), data.toBytes()) : - Transaction(toInt(tx["value"]), 0, toInt(tx["gasLimit"]), Address(tx["destination"].get_str()), data.toBytes()); + Transaction(toInt(tx["value"]), 0, toInt(tx["gasLimit"]), fromHex(tx["data"].get_str())) : + Transaction(toInt(tx["value"]), 0, toInt(tx["gasLimit"]), Address(tx["destination"].get_str()), fromHex(tx["data"].get_str())); callcreates.push_back(t); } } @@ -345,7 +345,7 @@ void doVMTests(json_spirit::mValue& v, bool _fillin) output = vm->go(fev, fev.simpleTrace()).toBytes(); gas = vm->gas(); } - catch (VMException const& _e) + catch (VMException const&) { cnote << "Safe VM Exception"; vmExceptionOccured = true; @@ -448,7 +448,8 @@ void doVMTests(json_spirit::mValue& v, bool _fillin) } checkAddresses<std::map<Address, std::tuple<u256, u256, std::map<u256, u256>, bytes> > >(test.addresses, fev.addresses); - BOOST_CHECK(test.callcreates == fev.callcreates); + + checkCallCreates(fev.callcreates, test.callcreates); checkLog(fev.sub.logs, test.sub.logs); } |