aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm/GasMeter.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-09-26 05:49:26 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-09-26 23:11:02 +0800
commit6a1e79a8e3fa8e8135de32b2b16eca93de5fb14c (patch)
treea2b30b2ecbdf68f36308b65b905d353a1729aa33 /libevmasm/GasMeter.cpp
parent5d985abcab8d54fcef142f01039ab6d5628f3237 (diff)
downloaddexon-solidity-6a1e79a8e3fa8e8135de32b2b16eca93de5fb14c.tar.gz
dexon-solidity-6a1e79a8e3fa8e8135de32b2b16eca93de5fb14c.tar.zst
dexon-solidity-6a1e79a8e3fa8e8135de32b2b16eca93de5fb14c.zip
Set the price of EXTCODEHASH properly
Diffstat (limited to 'libevmasm/GasMeter.cpp')
-rw-r--r--libevmasm/GasMeter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libevmasm/GasMeter.cpp b/libevmasm/GasMeter.cpp
index 59afc4da..d98b3efa 100644
--- a/libevmasm/GasMeter.cpp
+++ b/libevmasm/GasMeter.cpp
@@ -112,9 +112,11 @@ GasMeter::GasConsumption GasMeter::estimateMax(AssemblyItem const& _item, bool _
gas += wordGas(GasCosts::copyGas, m_state->relativeStackElement(-2));
break;
case Instruction::EXTCODESIZE:
- case Instruction::EXTCODEHASH:
gas = GasCosts::extCodeGas(m_evmVersion);
break;
+ case Instruction::EXTCODEHASH:
+ gas = GasCosts::balanceGas(m_evmVersion);
+ break;
case Instruction::EXTCODECOPY:
gas = GasCosts::extCodeGas(m_evmVersion);
gas += memoryGas(-1, -3);