Browse Source

Rename Executive::collectResult -> setResultRecipient.

cl-refactor
Paweł Bylica 10 years ago
parent
commit
f7ed7ed4de
  1. 2
      libethereum/Client.cpp
  2. 2
      libethereum/Executive.h
  3. 2
      libethereum/State.cpp
  4. 2
      mix/MixClient.cpp
  5. 2
      test/libsolidity/solidityExecutionFramework.h

2
libethereum/Client.cpp

@ -423,7 +423,7 @@ ExecutionResult Client::call(Address _dest, bytes const& _data, u256 _gas, u256
temp = m_postMine; temp = m_postMine;
temp.addBalance(_from, _value + _gasPrice * _gas); temp.addBalance(_from, _value + _gasPrice * _gas);
Executive e(temp, LastHashes(), 0); Executive e(temp, LastHashes(), 0);
e.collectResult(ret); e.setResultRecipient(ret);
if (!e.call(_dest, _from, _value, _gasPrice, &_data, _gas)) if (!e.call(_dest, _from, _value, _gasPrice, &_data, _gas))
e.go(); e.go();
e.finalize(); e.finalize();

2
libethereum/Executive.h

@ -119,7 +119,7 @@ public:
bool excepted() const { return m_excepted != TransactionException::None; } bool excepted() const { return m_excepted != TransactionException::None; }
/// Collect execution results in the result storage provided. /// Collect execution results in the result storage provided.
void collectResult(ExecutionResult& _res) { m_res = &_res; } void setResultRecipient(ExecutionResult& _res) { m_res = &_res; }
private: private:
State& m_s; ///< The state to which this operation/transaction is applied. State& m_s; ///< The state to which this operation/transaction is applied.

2
libethereum/State.cpp

@ -1190,7 +1190,7 @@ ExecutionResult State::execute(LastHashes const& _lh, Transaction const& _t, Per
// transaction is bad in any way. // transaction is bad in any way.
Executive e(*this, _lh, 0); Executive e(*this, _lh, 0);
ExecutionResult res; ExecutionResult res;
e.collectResult(res); e.setResultRecipient(res);
e.initialize(_t); e.initialize(_t);
// Uncommitting is a non-trivial operation - only do it once we've verified as much of the // Uncommitting is a non-trivial operation - only do it once we've verified as much of the

2
mix/MixClient.cpp

@ -132,7 +132,7 @@ void MixClient::executeTransaction(Transaction const& _t, State& _state, bool _c
execState.addBalance(t.sender(), t.gas() * t.gasPrice()); //give it enough balance for gas estimation execState.addBalance(t.sender(), t.gas() * t.gasPrice()); //give it enough balance for gas estimation
eth::ExecutionResult er; eth::ExecutionResult er;
Executive execution(execState, lastHashes, 0); Executive execution(execState, lastHashes, 0);
execution.collectResult(er); execution.setResultRecipient(er);
execution.initialize(t); execution.initialize(t);
execution.execute(); execution.execute();
std::vector<MachineState> machineStates; std::vector<MachineState> machineStates;

2
test/libsolidity/solidityExecutionFramework.h

@ -149,7 +149,7 @@ 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; eth::ExecutionResult res;
executive.collectResult(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()) :

Loading…
Cancel
Save