aboutsummaryrefslogtreecommitdiffstats
path: root/ExpressionCompiler.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-04-07 20:03:57 +0800
committerchriseth <c@ethdev.com>2015-04-07 20:03:57 +0800
commitda47c884113f4bbf103c085a6fc7af75a99323fc (patch)
tree7d2942de5a735e720c642b5c6246c5c447d84d4a /ExpressionCompiler.cpp
parent8e19eea7d5d6cd4bffa03f8617023a74268de608 (diff)
downloaddexon-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.cpp2
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.