aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-09-19 03:46:25 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-09-26 21:25:40 +0800
commitd7c3f197c4c5bb5eb735089486134fdc20a5850f (patch)
tree218e7d7fa10d0a26f8b036f60ad149811a5a1312 /libevmasm
parentd64be90497bd9cb519d7146f49e6861fee060383 (diff)
downloaddexon-solidity-d7c3f197c4c5bb5eb735089486134fdc20a5850f.tar.gz
dexon-solidity-d7c3f197c4c5bb5eb735089486134fdc20a5850f.tar.zst
dexon-solidity-d7c3f197c4c5bb5eb735089486134fdc20a5850f.zip
Some cleanups in GasMeter
Diffstat (limited to 'libevmasm')
-rw-r--r--libevmasm/GasMeter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libevmasm/GasMeter.cpp b/libevmasm/GasMeter.cpp
index b525c301..b40617c1 100644
--- a/libevmasm/GasMeter.cpp
+++ b/libevmasm/GasMeter.cpp
@@ -101,8 +101,8 @@ GasMeter::GasConsumption GasMeter::estimateMax(AssemblyItem const& _item, bool _
break;
case Instruction::KECCAK256:
gas = GasCosts::keccak256Gas;
- gas += wordGas(GasCosts::keccak256WordGas, m_state->relativeStackElement(-1));
gas += memoryGas(0, -1);
+ gas += wordGas(GasCosts::keccak256WordGas, m_state->relativeStackElement(-1));
break;
case Instruction::CALLDATACOPY:
case Instruction::CODECOPY:
@@ -214,7 +214,7 @@ GasMeter::GasConsumption GasMeter::memoryGas(ExpressionClasses::Id _position)
if (!value)
return GasConsumption::infinite();
if (*value < m_largestMemoryAccess)
- return GasConsumption(u256(0));
+ return GasConsumption(0);
u256 previous = m_largestMemoryAccess;
m_largestMemoryAccess = *value;
auto memGas = [=](u256 const& pos) -> u256