We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d03918 commit d2e3cb8Copy full SHA for d2e3cb8
core/state/statedb.go
@@ -331,10 +331,10 @@ func (s *StateDB) GetCodeSize(addr common.Address) int {
331
332
func (s *StateDB) GetCodeHash(addr common.Address) common.Hash {
333
stateObject := s.getStateObject(addr)
334
- if stateObject == nil {
335
- return common.Hash{}
+ if stateObject != nil {
+ return common.BytesToHash(stateObject.CodeHash())
336
}
337
- return common.BytesToHash(stateObject.CodeHash())
+ return common.Hash{}
338
339
340
// GetState retrieves a value from the given account's storage trie.
0 commit comments