mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 01:43:47 +00:00
core/vm: direct check code hash during creation instead of resolving
This commit is contained in:
parent
eda288cc81
commit
0a129dab19
1 changed files with 1 additions and 1 deletions
|
|
@ -463,7 +463,7 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64,
|
|||
// - the nonce is non-zero
|
||||
// - the code is non-empty
|
||||
// - the storage is non-empty
|
||||
contractHash := evm.resolveCodeHash(address)
|
||||
contractHash := evm.StateDB.GetCodeHash(address)
|
||||
storageRoot := evm.StateDB.GetStorageRoot(address)
|
||||
if evm.StateDB.GetNonce(address) != 0 ||
|
||||
(contractHash != (common.Hash{}) && contractHash != types.EmptyCodeHash) || // non-empty code
|
||||
|
|
|
|||
Loading…
Reference in a new issue