Skip to content

Commit 2e02c1f

Browse files
authored
core/rawdb: don't warn for missing "unclean shutdown markers" (#28014)
This changes removes the warn-printout about not finding unclean shutdown markers, which always happens on fresh installs / wiped databases.
1 parent 2f77299 commit 2e02c1f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/rawdb/accessors_metadata.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ const crashesToKeep = 10
111111
func PushUncleanShutdownMarker(db ethdb.KeyValueStore) ([]uint64, uint64, error) {
112112
var uncleanShutdowns crashList
113113
// Read old data
114-
if data, err := db.Get(uncleanShutdownKey); err != nil {
115-
log.Warn("Error reading unclean shutdown markers", "error", err)
116-
} else if err := rlp.DecodeBytes(data, &uncleanShutdowns); err != nil {
117-
return nil, 0, err
114+
if data, err := db.Get(uncleanShutdownKey); err == nil {
115+
if err := rlp.DecodeBytes(data, &uncleanShutdowns); err != nil {
116+
return nil, 0, err
117+
}
118118
}
119119
var discarded = uncleanShutdowns.Discarded
120120
var previous = make([]uint64, len(uncleanShutdowns.Recent))

0 commit comments

Comments
 (0)