aboutsummaryrefslogtreecommitdiffstats
path: root/TestHelper.cpp
diff options
context:
space:
mode:
authorCJentzsch <jentzsch.software@gmail.com>2015-03-04 00:36:09 +0800
committerGav Wood <i@gavwood.com>2015-03-06 19:45:25 +0800
commit983514a42ad56e2082d95a60e6c4e2f356c2e343 (patch)
tree61f752e98ea17b1422e9d48d219400b79d3b29e1 /TestHelper.cpp
parent3583184cda98248a3f94c6179af4365718ec9936 (diff)
downloaddexon-solidity-983514a42ad56e2082d95a60e6c4e2f356c2e343.tar
dexon-solidity-983514a42ad56e2082d95a60e6c4e2f356c2e343.tar.gz
dexon-solidity-983514a42ad56e2082d95a60e6c4e2f356c2e343.tar.bz2
dexon-solidity-983514a42ad56e2082d95a60e6c4e2f356c2e343.tar.lz
dexon-solidity-983514a42ad56e2082d95a60e6c4e2f356c2e343.tar.xz
dexon-solidity-983514a42ad56e2082d95a60e6c4e2f356c2e343.tar.zst
dexon-solidity-983514a42ad56e2082d95a60e6c4e2f356c2e343.zip
remove genesis state from state tests
Conflicts: test/state.cpp
Diffstat (limited to 'TestHelper.cpp')
-rw-r--r--TestHelper.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/TestHelper.cpp b/TestHelper.cpp
index 104c03f2..befd571e 100644
--- a/TestHelper.cpp
+++ b/TestHelper.cpp
@@ -69,7 +69,7 @@ namespace test
struct ValueTooLarge: virtual Exception {};
bigint const c_max256plus1 = bigint(1) << 256;
-ImportTest::ImportTest(json_spirit::mObject& _o, bool isFiller): m_TestObject(_o)
+ImportTest::ImportTest(json_spirit::mObject& _o, bool isFiller) : m_statePre(Address(_o["env"].get_obj()["currentCoinbase"].get_str()), OverlayDB(), eth::BaseState::Empty), m_statePost(Address(_o["env"].get_obj()["currentCoinbase"].get_str()), OverlayDB(), eth::BaseState::Empty), m_TestObject(_o)
{
importEnv(_o["env"].get_obj());
importState(_o["pre"].get_obj(), m_statePre);
@@ -183,13 +183,8 @@ void ImportTest::exportTest(bytes const& _output, State const& _statePost)
// export post state
json_spirit::mObject postState;
- std::map<Address, Account> genesis = genesisState();
-
for (auto const& a: _statePost.addresses())
{
- if (genesis.count(a.first))
- continue;
-
json_spirit::mObject o;
o["balance"] = toString(_statePost.balance(a.first));
o["nonce"] = toString(_statePost.transactionsFrom(a.first));
@@ -212,9 +207,6 @@ void ImportTest::exportTest(bytes const& _output, State const& _statePost)
for (auto const& a: m_statePre.addresses())
{
- if (genesis.count(a.first))
- continue;
-
json_spirit::mObject o;
o["balance"] = toString(m_statePre.balance(a.first));
o["nonce"] = toString(m_statePre.transactionsFrom(a.first));