core/state, core/vm: improve code hashing in the EVM

This commit is contained in:
Jeffrey Wilcke 2016-10-01 22:05:22 +02:00
parent aeb272ef5e
commit 926d81e34e

View file

@ -259,6 +259,7 @@ func (self *StateDB) GetCodeSize(addr common.Address) int {
return size return size
} }
// GetCodeHash returns the hash of the code associated with the address.
func (self *StateDB) GetCodeHash(addr common.Address) common.Hash { func (self *StateDB) GetCodeHash(addr common.Address) common.Hash {
stateObject := self.GetStateObject(addr) stateObject := self.GetStateObject(addr)
if stateObject == nil { if stateObject == nil {