diff options
author | chriseth <c@ethdev.com> | 2015-04-07 20:03:57 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-04-07 20:03:57 +0800 |
commit | da47c884113f4bbf103c085a6fc7af75a99323fc (patch) | |
tree | 7d2942de5a735e720c642b5c6246c5c447d84d4a /ExpressionCompiler.cpp | |
parent | 8e19eea7d5d6cd4bffa03f8617023a74268de608 (diff) | |
download | dexon-solidity-da47c884113f4bbf103c085a6fc7af75a99323fc.tar.gz dexon-solidity-da47c884113f4bbf103c085a6fc7af75a99323fc.tar.zst dexon-solidity-da47c884113f4bbf103c085a6fc7af75a99323fc.zip |
Retain more gas for the case that the called contract is not yet created.
Diffstat (limited to 'ExpressionCompiler.cpp')
-rw-r--r-- | ExpressionCompiler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp index daea2162..fb50fd2a 100644 --- a/ExpressionCompiler.cpp +++ b/ExpressionCompiler.cpp @@ -1029,7 +1029,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. |