From e8e45bb7ec620545105305033a20bef3d4b491de Mon Sep 17 00:00:00 2001 From: jsvisa Date: Tue, 31 Oct 2023 23:52:50 +0800 Subject: [PATCH] core/vm: check codehash Signed-off-by: jsvisa --- core/vm/contract.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/vm/contract.go b/core/vm/contract.go index e4b03bd74f..ec453d1e6e 100644 --- a/core/vm/contract.go +++ b/core/vm/contract.go @@ -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 {