|
@ -196,8 +196,6 @@ inline bytesConstRef VM::go(ExtVMFace& _ext, OnOpFunc const& _onOp, uint64_t _st |
|
|
require(7); |
|
|
require(7); |
|
|
runGas = (bigint)c_callGas + m_stack[m_stack.size() - 1]; |
|
|
runGas = (bigint)c_callGas + m_stack[m_stack.size() - 1]; |
|
|
newTempSize = std::max(memNeed(m_stack[m_stack.size() - 6], m_stack[m_stack.size() - 7]), memNeed(m_stack[m_stack.size() - 4], m_stack[m_stack.size() - 5])); |
|
|
newTempSize = std::max(memNeed(m_stack[m_stack.size() - 6], m_stack[m_stack.size() - 7]), memNeed(m_stack[m_stack.size() - 4], m_stack[m_stack.size() - 5])); |
|
|
if (_ext.depth == 1024) |
|
|
|
|
|
BOOST_THROW_EXCEPTION(OutOfGas()); |
|
|
|
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
case Instruction::CREATE: |
|
|
case Instruction::CREATE: |
|
@ -207,8 +205,6 @@ inline bytesConstRef VM::go(ExtVMFace& _ext, OnOpFunc const& _onOp, uint64_t _st |
|
|
u256 inSize = m_stack[m_stack.size() - 3]; |
|
|
u256 inSize = m_stack[m_stack.size() - 3]; |
|
|
newTempSize = (bigint)inOff + inSize; |
|
|
newTempSize = (bigint)inOff + inSize; |
|
|
runGas = c_createGas; |
|
|
runGas = c_createGas; |
|
|
if (_ext.depth == 1024) |
|
|
|
|
|
BOOST_THROW_EXCEPTION(OutOfGas()); |
|
|
|
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
case Instruction::EXP: |
|
|
case Instruction::EXP: |
|
@ -780,7 +776,7 @@ inline bytesConstRef VM::go(ExtVMFace& _ext, OnOpFunc const& _onOp, uint64_t _st |
|
|
unsigned initSize = (unsigned)m_stack.back(); |
|
|
unsigned initSize = (unsigned)m_stack.back(); |
|
|
m_stack.pop_back(); |
|
|
m_stack.pop_back(); |
|
|
|
|
|
|
|
|
if (_ext.balance(_ext.myAddress) >= endowment) |
|
|
if (_ext.balance(_ext.myAddress) >= endowment && _ext.depth < 1024) |
|
|
{ |
|
|
{ |
|
|
_ext.subBalance(endowment); |
|
|
_ext.subBalance(endowment); |
|
|
m_stack.push_back((u160)_ext.create(endowment, m_gas, bytesConstRef(m_temp.data() + initOff, initSize), _onOp)); |
|
|
m_stack.push_back((u160)_ext.create(endowment, m_gas, bytesConstRef(m_temp.data() + initOff, initSize), _onOp)); |
|
@ -808,7 +804,7 @@ inline bytesConstRef VM::go(ExtVMFace& _ext, OnOpFunc const& _onOp, uint64_t _st |
|
|
unsigned outSize = (unsigned)m_stack.back(); |
|
|
unsigned outSize = (unsigned)m_stack.back(); |
|
|
m_stack.pop_back(); |
|
|
m_stack.pop_back(); |
|
|
|
|
|
|
|
|
if (_ext.balance(_ext.myAddress) >= value) |
|
|
if (_ext.balance(_ext.myAddress) >= value && _ext.depth < 1024) |
|
|
{ |
|
|
{ |
|
|
_ext.subBalance(value); |
|
|
_ext.subBalance(value); |
|
|
m_stack.push_back(_ext.call(inst == Instruction::CALL ? receiveAddress : _ext.myAddress, value, bytesConstRef(m_temp.data() + inOff, inSize), gas, bytesRef(m_temp.data() + outOff, outSize), _onOp, {}, receiveAddress)); |
|
|
m_stack.push_back(_ext.call(inst == Instruction::CALL ? receiveAddress : _ext.myAddress, value, bytesConstRef(m_temp.data() + inOff, inSize), gas, bytesRef(m_temp.data() + outOff, outSize), _onOp, {}, receiveAddress)); |
|
|