mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core/vm: check codehash
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
4edc99fe5d
commit
e8e45bb7ec
1 changed files with 2 additions and 1 deletions
|
|
@ -20,6 +20,7 @@ import (
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
"github.com/ethereum/go-ethereum/core/types"
|
||||||
"github.com/holiman/uint256"
|
"github.com/holiman/uint256"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -106,7 +107,7 @@ func (c *Contract) isCode(udest uint64) bool {
|
||||||
// Do we have a contract hash already?
|
// Do we have a contract hash already?
|
||||||
// If we do have a hash, that means it's a 'regular' contract. For regular
|
// 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
|
// 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?
|
// Does parent context have the analysis?
|
||||||
analysis, exist := c.jumpdests[c.CodeHash]
|
analysis, exist := c.jumpdests[c.CodeHash]
|
||||||
if !exist {
|
if !exist {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue