Use EVM version in gas meter and optimizer.

This commit is contained in:
chriseth
2018-03-05 11:36:33 +01:00
parent 5a54cd5c70
commit 6ec4517929
28 changed files with 328 additions and 201 deletions
+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)