core/vm: check codehash

Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
jsvisa 2023-10-31 23:52:50 +08:00
parent 4edc99fe5d
commit e8e45bb7ec

View file

@ -20,6 +20,7 @@ import (
"math/big"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/holiman/uint256"
)
@ -106,7 +107,7 @@ func (c *Contract) isCode(udest uint64) bool {
// Do we have a contract hash already?
// If we do have a hash, that means it's a 'regular' contract. For regular
// contracts ( not temporary initcode), we store the analysis in a map
if c.CodeHash != (common.Hash{}) {
if c.CodeHash != types.EmptyCodeHash {
// Does parent context have the analysis?
analysis, exist := c.jumpdests[c.CodeHash]
if !exist {