Skip to content

Commit

Permalink
core/vm: direct check code hash during creation instead of resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
lightclient committed Dec 12, 2024
1 parent eda288c commit 0a129da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/vm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0a129da

Please sign in to comment.