diff options
author | Gav Wood <g@ethdev.com> | 2015-04-09 04:42:36 +0800 |
---|---|---|
committer | Gav Wood <g@ethdev.com> | 2015-04-09 04:42:36 +0800 |
commit | 07940a644dc561a5388b42a528f96095de1c510b (patch) | |
tree | 64ea178c34965df6357b362fa46a046ed3e78b44 /state.cpp | |
parent | 377e5435580e2e7e948e4a7690f0249f6af032d9 (diff) | |
parent | ff5ce7bda3346e3893d933196371564b4e45baec (diff) | |
download | dexon-solidity-07940a644dc561a5388b42a528f96095de1c510b.tar dexon-solidity-07940a644dc561a5388b42a528f96095de1c510b.tar.gz dexon-solidity-07940a644dc561a5388b42a528f96095de1c510b.tar.bz2 dexon-solidity-07940a644dc561a5388b42a528f96095de1c510b.tar.lz dexon-solidity-07940a644dc561a5388b42a528f96095de1c510b.tar.xz dexon-solidity-07940a644dc561a5388b42a528f96095de1c510b.tar.zst dexon-solidity-07940a644dc561a5388b42a528f96095de1c510b.zip |
Merge pull request #1401 from winsvega/expectedState
Expected state
Diffstat (limited to 'state.cpp')
-rw-r--r-- | state.cpp | 16 |
1 files changed, 1 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"); |