Skip to content

Commit

Permalink
core/rawdb: don't warn for missing "unclean shutdown markers" (ethere…
Browse files Browse the repository at this point in the history
…um#28014)

This changes removes the warn-printout about not finding unclean shutdown markers, which always happens on fresh installs / wiped databases.
  • Loading branch information
jsvisa authored and devopsbo3 committed Nov 10, 2023
1 parent 46d7fb2 commit f3d4945
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/rawdb/accessors_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ const crashesToKeep = 10
func PushUncleanShutdownMarker(db ethdb.KeyValueStore) ([]uint64, uint64, error) {
var uncleanShutdowns crashList
// Read old data
if data, err := db.Get(uncleanShutdownKey); err != nil {
log.Warn("Error reading unclean shutdown markers", "error", err)
} else if err := rlp.DecodeBytes(data, &uncleanShutdowns); err != nil {
return nil, 0, err
if data, err := db.Get(uncleanShutdownKey); err == nil {
if err := rlp.DecodeBytes(data, &uncleanShutdowns); err != nil {
return nil, 0, err
}
}
var discarded = uncleanShutdowns.Discarded
var previous = make([]uint64, len(uncleanShutdowns.Recent))
Expand Down

0 comments on commit f3d4945

Please sign in to comment.