mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Tighter estimation for EXP.
This commit is contained in:
parent
2414a23168
commit
dadde12178
@ -148,7 +148,7 @@ GasMeter::GasConsumption GasMeter::estimateMax(AssemblyItem const& _item)
|
|||||||
if (u256 const* value = classes.knownConstant(m_state->relativeStackElement(-1)))
|
if (u256 const* value = classes.knownConstant(m_state->relativeStackElement(-1)))
|
||||||
gas += c_expByteGas * (32 - (h256(*value).firstBitSet() / 8));
|
gas += c_expByteGas * (32 - (h256(*value).firstBitSet() / 8));
|
||||||
else
|
else
|
||||||
gas = GasConsumption::infinite();
|
gas += c_expByteGas * 32;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user