Skip to content

Commit 0a129da

Browse files
committed
core/vm: direct check code hash during creation instead of resolving
1 parent eda288c commit 0a129da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/vm/evm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64,
463463
// - the nonce is non-zero
464464
// - the code is non-empty
465465
// - the storage is non-empty
466-
contractHash := evm.resolveCodeHash(address)
466+
contractHash := evm.StateDB.GetCodeHash(address)
467467
storageRoot := evm.StateDB.GetStorageRoot(address)
468468
if evm.StateDB.GetNonce(address) != 0 ||
469469
(contractHash != (common.Hash{}) && contractHash != types.EmptyCodeHash) || // non-empty code

0 commit comments

Comments
 (0)