Browse Source

Updates to contract creation code.

cl-refactor
Gav Wood 11 years ago
parent
commit
52bb88b88a
  1. 10
      libethereum/State.cpp

10
libethereum/State.cpp

@ -916,16 +916,10 @@ h160 State::create(Address _sender, u256 _endowment, u256 _gasPrice, u256* _gas,
if (revert) if (revert)
evm.revert(); evm.revert();
// Kill contract if there's no code. // Set code as long as we didn't suicide.
if (out.empty()) if (addressInUse(newAddress))
{
m_cache.erase(newAddress);
newAddress = Address();
}
else
m_cache[newAddress].setCode(out); m_cache[newAddress].setCode(out);
*_gas = vm.gas(); *_gas = vm.gas();
return newAddress; return newAddress;

Loading…
Cancel
Save