aboutsummaryrefslogtreecommitdiffstats
path: root/TestHelper.h
diff options
context:
space:
mode:
authorGav Wood <i@gavwood.com>2015-07-22 17:30:01 +0800
committerGav Wood <i@gavwood.com>2015-08-06 04:34:13 +0800
commite0863fbd27ae087e3afea94179274dbd29811f66 (patch)
treef363cdfe77b88604c3d076e3c29ac4abc673b25e /TestHelper.h
parentfbe4ce37a0df8f19ecc8978e1bf65a867bdf6492 (diff)
downloaddexon-solidity-e0863fbd27ae087e3afea94179274dbd29811f66.tar.gz
dexon-solidity-e0863fbd27ae087e3afea94179274dbd29811f66.tar.zst
dexon-solidity-e0863fbd27ae087e3afea94179274dbd29811f66.zip
First draft at splitting State.
Continuation of State split. libethereum building again. Compile fixes galore. Remove a lot of code redundancy. mix using new state/block classes
Diffstat (limited to 'TestHelper.h')
-rw-r--r--TestHelper.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/TestHelper.h b/TestHelper.h
index 48eb42c5..85e901b2 100644
--- a/TestHelper.h
+++ b/TestHelper.h
@@ -122,26 +122,16 @@ namespace test
} \
while (0)
-struct ImportStateOptions
-{
- ImportStateOptions(bool _bSetAll = false):m_bHasBalance(_bSetAll), m_bHasNonce(_bSetAll), m_bHasCode(_bSetAll), m_bHasStorage(_bSetAll) {}
- bool isAllSet() {return m_bHasBalance && m_bHasNonce && m_bHasCode && m_bHasStorage;}
- bool m_bHasBalance;
- bool m_bHasNonce;
- bool m_bHasCode;
- bool m_bHasStorage;
-};
-typedef std::map<Address, ImportStateOptions> stateOptionsMap;
-
class ImportTest
{
public:
- ImportTest(json_spirit::mObject& _o): m_TestObject(_o) {}
+ ImportTest(json_spirit::mObject& _o): m_environment(m_envInfo), m_testObject(_o) {}
ImportTest(json_spirit::mObject& _o, bool isFiller);
+
// imports
void importEnv(json_spirit::mObject& _o);
static void importState(json_spirit::mObject& _o, eth::State& _state);
- static void importState(json_spirit::mObject& _o, eth::State& _state, stateOptionsMap& _stateOptionsMap);
+ static void importState(json_spirit::mObject& _o, eth::State& _state, eth::AccountMaskMap& o_mask);
void importTransaction(json_spirit::mObject& _o);
static json_spirit::mObject& makeAllFieldsHex(json_spirit::mObject& _o);
@@ -150,17 +140,18 @@ public:
eth::State m_statePre;
eth::State m_statePost;
+ eth::EnvInfo m_envInfo;
eth::ExtVMFace m_environment;
eth::Transaction m_transaction;
private:
- json_spirit::mObject& m_TestObject;
+ json_spirit::mObject& m_testObject;
};
class ZeroGasPricer: public eth::GasPricer
{
protected:
- u256 ask(eth::State const&) const override { return 0; }
+ u256 ask(eth::Block const&) const override { return 0; }
u256 bid(eth::TransactionPriority = eth::TransactionPriority::Medium) const override { return 0; }
};