core/vm/gas_table: Use ExpGas param in gasExp computation

This commit is contained in:
Nalin Bhardwaj 2019-01-16 19:14:10 +05:30
parent c267561406
commit 0ead5c85d1
No known key found for this signature in database
GPG key ID: 79FC16920BE4C18C

View file

@ -380,7 +380,7 @@ func gasExp(gt params.GasTable, evm *EVM, contract *Contract, stack *Stack, mem
gas = expByteLen * gt.ExpByte // no overflow check required. Max is 256 * ExpByte gas gas = expByteLen * gt.ExpByte // no overflow check required. Max is 256 * ExpByte gas
overflow bool overflow bool
) )
if gas, overflow = math.SafeAdd(gas, GasSlowStep); overflow { if gas, overflow = math.SafeAdd(gas, params.ExpGas); overflow {
return 0, errGasUintOverflow return 0, errGasUintOverflow
} }
return gas, nil return gas, nil