diff options
author | Gav Wood <g@ethdev.com> | 2015-04-09 04:45:13 +0800 |
---|---|---|
committer | Gav Wood <g@ethdev.com> | 2015-04-09 04:45:13 +0800 |
commit | e1b20fb3a10f629aff172399c6e6111c941f931d (patch) | |
tree | 4195014350ff7a0a5f6282baa5a073d763c08094 | |
parent | 6f38bfeb6c66122ed31d744caad3577e4b4653d5 (diff) | |
parent | da47c884113f4bbf103c085a6fc7af75a99323fc (diff) | |
download | dexon-solidity-e1b20fb3a10f629aff172399c6e6111c941f931d.tar dexon-solidity-e1b20fb3a10f629aff172399c6e6111c941f931d.tar.gz dexon-solidity-e1b20fb3a10f629aff172399c6e6111c941f931d.tar.bz2 dexon-solidity-e1b20fb3a10f629aff172399c6e6111c941f931d.tar.lz dexon-solidity-e1b20fb3a10f629aff172399c6e6111c941f931d.tar.xz dexon-solidity-e1b20fb3a10f629aff172399c6e6111c941f931d.tar.zst dexon-solidity-e1b20fb3a10f629aff172399c6e6111c941f931d.zip |
Merge pull request #1546 from chriseth/sol_assumeContractNotCreated
Retain more gas for the case that the called contract is not yet created
-rw-r--r-- | ExpressionCompiler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp index dcfb6e17..7ea71a7a 100644 --- a/ExpressionCompiler.cpp +++ b/ExpressionCompiler.cpp @@ -1054,7 +1054,7 @@ void ExpressionCompiler::appendExternalFunctionCall(FunctionType const& _functio else // send all gas except the amount needed to execute "SUB" and "CALL" // @todo this retains too much gas for now, needs to be fine-tuned. - m_context << u256(50 + (_functionType.valueSet() ? 9000 : 0)) << eth::Instruction::GAS << eth::Instruction::SUB; + m_context << u256(50 + (_functionType.valueSet() ? 9000 : 0) + 25000) << eth::Instruction::GAS << eth::Instruction::SUB; m_context << eth::Instruction::CALL; auto tag = m_context.appendConditionalJump(); m_context << eth::Instruction::STOP << tag; // STOP if CALL leaves 0. |