mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
core/vm: correct check for empty hash
This commit is contained in:
parent
843d483240
commit
4727670df7
2 changed files with 2 additions and 2 deletions
|
|
@ -94,7 +94,7 @@ func (c *Contract) validJumpdest(dest *big.Int) bool {
|
||||||
}
|
}
|
||||||
var analysis bitvec
|
var analysis bitvec
|
||||||
// Do we have a contract hash already?
|
// Do we have a contract hash already?
|
||||||
if c.CodeHash != emptyCodeHash {
|
if c.CodeHash != (common.Hash{}) {
|
||||||
var exist bool
|
var exist bool
|
||||||
// Does parent context have the analysis?
|
// Does parent context have the analysis?
|
||||||
analysis, exist = c.jumpdests[c.CodeHash]
|
analysis, exist = c.jumpdests[c.CodeHash]
|
||||||
|
|
|
||||||
|
|
@ -358,7 +358,7 @@ type codeAndHash struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *codeAndHash) Hash() common.Hash {
|
func (c *codeAndHash) Hash() common.Hash {
|
||||||
if c.hash == emptyCodeHash {
|
if c.hash == (common.Hash{}) {
|
||||||
c.hash = crypto.Keccak256Hash(c.code)
|
c.hash = crypto.Keccak256Hash(c.code)
|
||||||
}
|
}
|
||||||
return c.hash
|
return c.hash
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue