From be5989f134a6aaa6cb50c12ece79a47fc948803b Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Wed, 24 Dec 2014 11:36:08 +0100 Subject: [PATCH] Implemented 256-long history for PREVHASH, though still optional. --- solidityExecutionFramework.h | 2 +- state.cpp | 2 +- stateOriginal.cpp | 2 +- vm.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/solidityExecutionFramework.h b/solidityExecutionFramework.h index 91ee7ad6a..9f25b3725 100644 --- a/solidityExecutionFramework.h +++ b/solidityExecutionFramework.h @@ -117,7 +117,7 @@ private: void sendMessage(bytes const& _data, bool _isCreation, u256 const& _value = 0) { m_state.addBalance(m_sender, _value); // just in case - eth::Executive executive(m_state, 0); + eth::Executive executive(m_state, eth::LastHashes(), 0); eth::Transaction t = _isCreation ? eth::Transaction(_value, m_gasPrice, m_gas, _data, 0, KeyPair::create().sec()) : eth::Transaction(_value, m_gasPrice, m_gas, m_contractAddress, _data, 0, KeyPair::create().sec()); bytes transactionRLP = t.rlp(); diff --git a/state.cpp b/state.cpp index b1ad8d44e..133468226 100644 --- a/state.cpp +++ b/state.cpp @@ -62,7 +62,7 @@ void doStateTests(json_spirit::mValue& v, bool _fillin) try { - theState.execute(tx, &output); + theState.execute(LastHashes(), tx, &output); } catch (Exception const& _e) { diff --git a/stateOriginal.cpp b/stateOriginal.cpp index 8344894f4..a49c55061 100644 --- a/stateOriginal.cpp +++ b/stateOriginal.cpp @@ -69,7 +69,7 @@ int stateTest() assert(t.sender() == myMiner.address()); tx = t.rlp(); } - s.execute(tx); + s.execute(bc, tx); cout << s; diff --git a/vm.cpp b/vm.cpp index 920f0582c..18bf57977 100644 --- a/vm.cpp +++ b/vm.cpp @@ -33,7 +33,7 @@ using namespace dev::eth; using namespace dev::test; FakeExtVM::FakeExtVM(eth::BlockInfo const& _previousBlock, eth::BlockInfo const& _currentBlock, unsigned _depth): /// TODO: XXX: remove the default argument & fix. - ExtVMFace(Address(), Address(), Address(), 0, 1, bytesConstRef(), bytes(), _previousBlock, _currentBlock, _depth) {} + ExtVMFace(Address(), Address(), Address(), 0, 1, bytesConstRef(), bytes(), _previousBlock, _currentBlock, LastHashes(), _depth) {} h160 FakeExtVM::create(u256 _endowment, u256& io_gas, bytesConstRef _init, OnOpFunc const&) {