diff options
author | chriseth <chris@ethereum.org> | 2017-04-26 20:29:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-26 20:29:54 +0800 |
commit | 3cbdf6d490c6871d58f12f877cdc84111a7325c1 (patch) | |
tree | 10c53b37db2275d9b6b220bb572ceca777e20297 /libevmasm/GasMeter.cpp | |
parent | c3b839ca751bd11a5881fea1db1cfa92ec468d16 (diff) | |
parent | efa9c7626718023083489aebee9a1662c5f24ab5 (diff) | |
download | dexon-solidity-3cbdf6d490c6871d58f12f877cdc84111a7325c1.tar dexon-solidity-3cbdf6d490c6871d58f12f877cdc84111a7325c1.tar.gz dexon-solidity-3cbdf6d490c6871d58f12f877cdc84111a7325c1.tar.bz2 dexon-solidity-3cbdf6d490c6871d58f12f877cdc84111a7325c1.tar.lz dexon-solidity-3cbdf6d490c6871d58f12f877cdc84111a7325c1.tar.xz dexon-solidity-3cbdf6d490c6871d58f12f877cdc84111a7325c1.tar.zst dexon-solidity-3cbdf6d490c6871d58f12f877cdc84111a7325c1.zip |
Merge pull request #1577 from ethereum/gas_table
Gas table update
Diffstat (limited to 'libevmasm/GasMeter.cpp')
-rw-r--r-- | libevmasm/GasMeter.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libevmasm/GasMeter.cpp b/libevmasm/GasMeter.cpp index a0adc35d..f5fd00ea 100644 --- a/libevmasm/GasMeter.cpp +++ b/libevmasm/GasMeter.cpp @@ -149,6 +149,10 @@ GasMeter::GasConsumption GasMeter::estimateMax(AssemblyItem const& _item, bool _ } break; } + case Instruction::SELFDESTRUCT: + gas = GasCosts::selfdestructGas; + gas += GasCosts::callNewAccountGas; // We very rarely know whether the address exists. + break; case Instruction::CREATE: if (_includeExternalCosts) // We assume that we do not know the target contract and thus, the consumption is infinite. @@ -232,6 +236,8 @@ unsigned GasMeter::runGas(Instruction _instruction) case Tier::High: return GasCosts::tier5Gas; case Tier::Ext: return GasCosts::tier6Gas; case Tier::Special: return GasCosts::tier7Gas; + case Tier::ExtCode: return GasCosts::extCodeGas; + case Tier::Balance: return GasCosts::balanceGas; default: break; } assertThrow(false, OptimizerException, "Invalid gas tier."); |