diff options
author | Paweł Bylica <pawel.bylica@imapp.pl> | 2014-10-22 18:45:26 +0800 |
---|---|---|
committer | Paweł Bylica <pawel.bylica@imapp.pl> | 2014-10-22 18:45:26 +0800 |
commit | 95e7e44c0895c76f1bb8b105c6c76658e401a34b (patch) | |
tree | fd7ffa416e09307d09d514d12d872470d80c9f17 | |
parent | d5c09e6450ed8182c3e6e680e6094c1e81b4af0d (diff) | |
download | dexon-solidity-95e7e44c0895c76f1bb8b105c6c76658e401a34b.tar.gz dexon-solidity-95e7e44c0895c76f1bb8b105c6c76658e401a34b.tar.zst dexon-solidity-95e7e44c0895c76f1bb8b105c6c76658e401a34b.zip |
Add virtual specifier to overridden methods in FakeVM
-rw-r--r-- | vm.h | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -50,18 +50,18 @@ public: class FakeExtVM: public eth::ExtVMFace { public: - FakeExtVM() {} + FakeExtVM() = default; FakeExtVM(eth::BlockInfo const& _previousBlock, eth::BlockInfo const& _currentBlock, unsigned _depth = 0); - u256 store(u256 _n) override { return std::get<2>(addresses[myAddress])[_n]; } - void setStore(u256 _n, u256 _v) override { std::get<2>(addresses[myAddress])[_n] = _v; } - u256 balance(Address _a) override { return std::get<0>(addresses[_a]); } - void subBalance(u256 _a) override { std::get<0>(addresses[myAddress]) -= _a; } - u256 txCount(Address _a) override { return std::get<1>(addresses[_a]); } - void suicide(Address _a) override { std::get<0>(addresses[_a]) += std::get<0>(addresses[myAddress]); addresses.erase(myAddress); } - bytes const& codeAt(Address _a) override { return std::get<3>(addresses[_a]); } - h160 create(u256 _endowment, u256* _gas, bytesConstRef _init, eth::OnOpFunc const&) override; - bool call(Address _receiveAddress, u256 _value, bytesConstRef _data, u256* _gas, bytesRef _out, eth::OnOpFunc const&, Address, Address) override; + virtual u256 store(u256 _n) override { return std::get<2>(addresses[myAddress])[_n]; } + virtual void setStore(u256 _n, u256 _v) override { std::get<2>(addresses[myAddress])[_n] = _v; } + virtual u256 balance(Address _a) override { return std::get<0>(addresses[_a]); } + virtual void subBalance(u256 _a) override { std::get<0>(addresses[myAddress]) -= _a; } + virtual u256 txCount(Address _a) override { return std::get<1>(addresses[_a]); } + virtual void suicide(Address _a) override { std::get<0>(addresses[_a]) += std::get<0>(addresses[myAddress]); addresses.erase(myAddress); } + virtual bytes const& codeAt(Address _a) override { return std::get<3>(addresses[_a]); } + virtual h160 create(u256 _endowment, u256* _gas, bytesConstRef _init, eth::OnOpFunc const&) override; + virtual bool call(Address _receiveAddress, u256 _value, bytesConstRef _data, u256* _gas, bytesRef _out, eth::OnOpFunc const&, Address, Address) override; void setTransaction(Address _caller, u256 _value, u256 _gasPrice, bytes const& _data); void setContract(Address _myAddress, u256 _myBalance, u256 _myNonce, std::map<u256, u256> const& _storage, bytes const& _code); void set(Address _a, u256 _myBalance, u256 _myNonce, std::map<u256, u256> const& _storage, bytes const& _code); |