aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Holst Swende <martin@swende.se>2017-09-04 16:56:45 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-09-04 16:56:45 +0800
commit23b51a68cbdd637824be906c9354a0b59c57491b (patch)
treed7f182bdf8b93e90f526637991f3490d12e9a654
parentdc92779c0a1e01de9561087a3a534d9d7cfdef3f (diff)
downloaddexon-23b51a68cbdd637824be906c9354a0b59c57491b.tar
dexon-23b51a68cbdd637824be906c9354a0b59c57491b.tar.gz
dexon-23b51a68cbdd637824be906c9354a0b59c57491b.tar.bz2
dexon-23b51a68cbdd637824be906c9354a0b59c57491b.tar.lz
dexon-23b51a68cbdd637824be906c9354a0b59c57491b.tar.xz
dexon-23b51a68cbdd637824be906c9354a0b59c57491b.tar.zst
dexon-23b51a68cbdd637824be906c9354a0b59c57491b.zip
core/vm: avoid state lookup during gas calc for call (#15061)
-rw-r--r--core/vm/gas_table.go2
1 files changed, 1 insertions, 1 deletions
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) {