diff --git a/core/state/statedb.go b/core/state/statedb.go index 3a63e7faceea..61081c3cbf17 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -1032,9 +1032,8 @@ func (s *StateDB) Commit(deleteEmptyObjects bool) (common.Hash, error) { } else { s.setError(err) } - } else { - rawdb.WriteCode(codeWriter, common.BytesToHash(obj.CodeHash()), obj.code) } + rawdb.WriteCode(codeWriter, common.BytesToHash(obj.CodeHash()), obj.code) obj.dirtyCode = false } }