mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22: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
|
||||
// Do we have a contract hash already?
|
||||
if c.CodeHash != emptyCodeHash {
|
||||
if c.CodeHash != (common.Hash{}) {
|
||||
var exist bool
|
||||
// Does parent context have the analysis?
|
||||
analysis, exist = c.jumpdests[c.CodeHash]
|
||||
|
|
|
|||
|
|
@ -358,7 +358,7 @@ type codeAndHash struct {
|
|||
}
|
||||
|
||||
func (c *codeAndHash) Hash() common.Hash {
|
||||
if c.hash == emptyCodeHash {
|
||||
if c.hash == (common.Hash{}) {
|
||||
c.hash = crypto.Keccak256Hash(c.code)
|
||||
}
|
||||
return c.hash
|
||||
|
|
|
|||
Loading…
Reference in a new issue