Merge pull request #2025 from imapp-pl/refactor_executive

Executive on a diet
This commit is contained in:
Gav Wood 2015-06-08 22:52:39 +09:00
commit 88865c546f

View File

@ -148,6 +148,8 @@ protected:
{ {
m_state.addBalance(m_sender, _value); // just in case m_state.addBalance(m_sender, _value); // just in case
eth::Executive executive(m_state, eth::LastHashes(), 0); eth::Executive executive(m_state, eth::LastHashes(), 0);
eth::ExecutionResult res;
executive.setResultRecipient(res);
eth::Transaction t = eth::Transaction t =
_isCreation ? _isCreation ?
eth::Transaction(_value, m_gasPrice, m_gas, _data, 0, KeyPair::create().sec()) : eth::Transaction(_value, m_gasPrice, m_gas, _data, 0, KeyPair::create().sec()) :
@ -176,7 +178,7 @@ protected:
m_state.noteSending(m_sender); m_state.noteSending(m_sender);
executive.finalize(); executive.finalize();
m_gasUsed = executive.gasUsed(); m_gasUsed = executive.gasUsed();
m_output = executive.out().toVector(); m_output = std::move(res.output); // FIXME: Looks like Framework needs ExecutiveResult embedded
m_logs = executive.logs(); m_logs = executive.logs();
} }