aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/interface/GasEstimator.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-09-18 23:16:21 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-09-26 21:25:40 +0800
commitd64be90497bd9cb519d7146f49e6861fee060383 (patch)
treef131f50a92014ca051191ebbb55c5e43a3c81319 /libsolidity/interface/GasEstimator.cpp
parent9be058eb70be20d379d48a8902d112ba491aae2d (diff)
downloaddexon-solidity-d64be90497bd9cb519d7146f49e6861fee060383.tar.gz
dexon-solidity-d64be90497bd9cb519d7146f49e6861fee060383.tar.zst
dexon-solidity-d64be90497bd9cb519d7146f49e6861fee060383.zip
Add PathGasMeter.estimateMax helper
Diffstat (limited to 'libsolidity/interface/GasEstimator.cpp')
-rw-r--r--libsolidity/interface/GasEstimator.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/libsolidity/interface/GasEstimator.cpp b/libsolidity/interface/GasEstimator.cpp
index a532f86e..e70e23a2 100644
--- a/libsolidity/interface/GasEstimator.cpp
+++ b/libsolidity/interface/GasEstimator.cpp
@@ -160,8 +160,7 @@ GasEstimator::GasConsumption GasEstimator::functionalEstimation(
);
}
- PathGasMeter meter(_items, m_evmVersion);
- return meter.estimateMax(0, state);
+ return PathGasMeter::estimateMax(_items, m_evmVersion, 0, state);
}
GasEstimator::GasConsumption GasEstimator::functionalEstimation(
@@ -183,7 +182,7 @@ GasEstimator::GasConsumption GasEstimator::functionalEstimation(
if (parametersSize > 0)
state->feedItem(swapInstruction(parametersSize));
- return PathGasMeter(_items, m_evmVersion).estimateMax(_offset, state);
+ return PathGasMeter::estimateMax(_items, m_evmVersion, _offset, state);
}
set<ASTNode const*> GasEstimator::finestNodesAtLocation(