From 23b51a68cbdd637824be906c9354a0b59c57491b Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Mon, 4 Sep 2017 10:56:45 +0200 Subject: core/vm: avoid state lookup during gas calc for call (#15061) --- core/vm/gas_table.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/vm/gas_table.go') diff --git a/core/vm/gas_table.go b/core/vm/gas_table.go index 3b0698ce9..13712295c 100644 --- a/core/vm/gas_table.go +++ b/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) ) if eip158 { - if evm.StateDB.Empty(address) && transfersValue { + if transfersValue && evm.StateDB.Empty(address) { gas += params.CallNewAccountGas } } else if !evm.StateDB.Exist(address) { -- cgit v1.2.3