Use EVM version in gas meter and optimizer.

This commit is contained in:
chriseth committed 2018-03-05 11:36:33 +01:00
1 parent 5a54cd5c70
commit 6ec4517929
28 files changed
+328 -201

No files matched your search

+1 -1
View File
@@ -1756,7 +1756,7 @@ void ExpressionCompiler::appendExternalFunctionCall(
{
// 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.
u256 gasNeededByCaller = eth::GasCosts::callGas + 10;
u256 gasNeededByCaller = eth::GasCosts::callGas(m_context.evmVersion()) + 10;
if (_functionType.valueSet())
gasNeededByCaller += eth::GasCosts::callValueTransferGas;
if (!existenceChecked)