core/vm: avoid state lookup during gas calc for call (#15061)

release/1.7
Martin Holst Swende 8 years ago committed by Felix Lange
parent dc92779c0a
commit 23b51a68cb
  1. 2
      core/vm/gas_table.go

@ -324,7 +324,7 @@ func gasCall(gt params.GasTable, evm *EVM, contract *Contract, stack *Stack, mem
eip158 = evm.ChainConfig().IsEIP158(evm.BlockNumber) eip158 = evm.ChainConfig().IsEIP158(evm.BlockNumber)
) )
if eip158 { if eip158 {
if evm.StateDB.Empty(address) && transfersValue { if transfersValue && evm.StateDB.Empty(address) {
gas += params.CallNewAccountGas gas += params.CallNewAccountGas
} }
} else if !evm.StateDB.Exist(address) { } else if !evm.StateDB.Exist(address) {

Loading…
Cancel
Save