core/state: logic equivalence for GetCodeHash (#28733)

pull/28741/head
cygaar 11 months ago committed by GitHub
parent 8d0391806f
commit d2e3cb894b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      core/state/statedb.go

@ -331,10 +331,10 @@ func (s *StateDB) GetCodeSize(addr common.Address) int {
func (s *StateDB) GetCodeHash(addr common.Address) common.Hash {
stateObject := s.getStateObject(addr)
if stateObject == nil {
return common.Hash{}
if stateObject != nil {
return common.BytesToHash(stateObject.CodeHash())
}
return common.BytesToHash(stateObject.CodeHash())
return common.Hash{}
}
// GetState retrieves a value from the given account's storage trie.

Loading…
Cancel
Save