aboutsummaryrefslogtreecommitdiffstats
path: root/vm.h
diff options
context:
space:
mode:
authorGav Wood <i@gavwood.com>2014-10-10 02:19:43 +0800
committerGav Wood <i@gavwood.com>2014-10-10 02:19:43 +0800
commit8472a0f06f89298ba4ab828291784673ae7bc31c (patch)
treef1cd2c74825edcb70c947d2928d7c5d1a3c2cb26 /vm.h
parent9e27cb00da163ae797de8ae334e549ec2068fd2e (diff)
parentdcfcbda2fa11b243532a02f0a762aada6b225f46 (diff)
downloaddexon-solidity-8472a0f06f89298ba4ab828291784673ae7bc31c.tar
dexon-solidity-8472a0f06f89298ba4ab828291784673ae7bc31c.tar.gz
dexon-solidity-8472a0f06f89298ba4ab828291784673ae7bc31c.tar.bz2
dexon-solidity-8472a0f06f89298ba4ab828291784673ae7bc31c.tar.lz
dexon-solidity-8472a0f06f89298ba4ab828291784673ae7bc31c.tar.xz
dexon-solidity-8472a0f06f89298ba4ab828291784673ae7bc31c.tar.zst
dexon-solidity-8472a0f06f89298ba4ab828291784673ae7bc31c.zip
Merge pull request #346 from CJentzsch/develop
Corrected call function in FakeExtVM
Diffstat (limited to 'vm.h')
-rw-r--r--vm.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/vm.h b/vm.h
index a7147743..34e0e855 100644
--- a/vm.h
+++ b/vm.h
@@ -40,6 +40,13 @@ namespace dev { namespace test {
struct FakeExtVMFailure : virtual Exception {};
+class FakeState: public eth::State
+{
+public:
+ /// Execute a contract-creation transaction.
+ h160 createNewAddress(Address _newAddress, Address _txSender, u256 _endowment, u256 _gasPrice, u256* _gas, bytesConstRef _code, Address _originAddress = Address(), std::set<Address>* o_suicides = nullptr, eth::Manifest* o_ms = nullptr, eth::OnOpFunc const& _onOp = eth::OnOpFunc(), unsigned _level = 0);
+};
+
class FakeExtVM: public eth::ExtVMFace
{
public:
@@ -63,6 +70,7 @@ public:
byte toByte(json_spirit::mValue const& _v);
void push(json_spirit::mObject& o, std::string const& _n, u256 _v);
void push(json_spirit::mArray& a, u256 _v);
+ u256 doPosts();
json_spirit::mObject exportEnv();
void importEnv(json_spirit::mObject& _o);
json_spirit::mObject exportState();
@@ -79,7 +87,7 @@ public:
u256 gas;
private:
- eth::State m_s;
+ FakeState m_s;
eth::Manifest m_ms;
};