diff options
author | subtly <subtly@users.noreply.github.com> | 2015-04-11 00:14:57 +0800 |
---|---|---|
committer | subtly <subtly@users.noreply.github.com> | 2015-04-11 00:14:57 +0800 |
commit | 9965121d631dba5209c45bfddc7a4420f919467c (patch) | |
tree | f9a4acdff9b3850f8d31d8f28e486e832715b76f /state.cpp | |
parent | f08eb06c7ac0a4f126777599c0826b6e78f60ab4 (diff) | |
parent | c111dbff3f4d4d5e6d064b38bcd645f2d763ccab (diff) | |
download | dexon-solidity-9965121d631dba5209c45bfddc7a4420f919467c.tar dexon-solidity-9965121d631dba5209c45bfddc7a4420f919467c.tar.gz dexon-solidity-9965121d631dba5209c45bfddc7a4420f919467c.tar.bz2 dexon-solidity-9965121d631dba5209c45bfddc7a4420f919467c.tar.lz dexon-solidity-9965121d631dba5209c45bfddc7a4420f919467c.tar.xz dexon-solidity-9965121d631dba5209c45bfddc7a4420f919467c.tar.zst dexon-solidity-9965121d631dba5209c45bfddc7a4420f919467c.zip |
Merge branch 'p2p' into whisper
Diffstat (limited to 'state.cpp')
-rw-r--r-- | state.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
@@ -91,23 +91,9 @@ void doStateTests(json_spirit::mValue& v, bool _fillin) // check addresses #if ETH_FATDB + ImportTest::checkExpectedState(importer.m_statePost, theState); auto expectedAddrs = importer.m_statePost.addresses(); auto resultAddrs = theState.addresses(); - for (auto& expectedPair : expectedAddrs) - { - auto& expectedAddr = expectedPair.first; - auto resultAddrIt = resultAddrs.find(expectedAddr); - if (resultAddrIt == resultAddrs.end()) - BOOST_ERROR("Missing expected address " << expectedAddr); - else - { - BOOST_CHECK_MESSAGE(importer.m_statePost.balance(expectedAddr) == theState.balance(expectedAddr), expectedAddr << ": incorrect balance " << theState.balance(expectedAddr) << ", expected " << importer.m_statePost.balance(expectedAddr)); - BOOST_CHECK_MESSAGE(importer.m_statePost.transactionsFrom(expectedAddr) == theState.transactionsFrom(expectedAddr), expectedAddr << ": incorrect txCount " << theState.transactionsFrom(expectedAddr) << ", expected " << importer.m_statePost.transactionsFrom(expectedAddr)); - BOOST_CHECK_MESSAGE(importer.m_statePost.code(expectedAddr) == theState.code(expectedAddr), expectedAddr << ": incorrect code"); - - checkStorage(importer.m_statePost.storage(expectedAddr), theState.storage(expectedAddr), expectedAddr); - } - } checkAddresses<map<Address, u256> >(expectedAddrs, resultAddrs); #endif BOOST_CHECK_MESSAGE(theState.rootHash() == h256(o["postStateRoot"].get_str()), "wrong post state root"); @@ -232,6 +218,8 @@ BOOST_AUTO_TEST_CASE(stCreateTest) BOOST_AUTO_TEST_CASE(stRandom) { + test::Options::get(); // parse command line options, e.g. to enable JIT + string testPath = dev::test::getTestPath(); testPath += "/StateTests/RandomTests"; |