Skip to content

Commit

Permalink
Revert "core/rawdb: remove unused transition status state accessors (#…
Browse files Browse the repository at this point in the history
…30433)"

This reverts commit ae70744.
  • Loading branch information
gballet authored Sep 17, 2024
1 parent 8dd2962 commit ac04ead
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions core/rawdb/accessors_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,16 @@ func UpdateUncleanShutdownMarker(db ethdb.KeyValueStore) {
log.Warn("Failed to write unclean-shutdown marker", "err", err)
}
}

// ReadTransitionStatus retrieves the eth2 transition status from the database
func ReadTransitionStatus(db ethdb.KeyValueReader) []byte {
data, _ := db.Get(transitionStatusKey)
return data
}

// WriteTransitionStatus stores the eth2 transition status to the database
func WriteTransitionStatus(db ethdb.KeyValueWriter, data []byte) {
if err := db.Put(transitionStatusKey, data); err != nil {
log.Crit("Failed to store the eth2 transition status", "err", err)
}
}

0 comments on commit ac04ead

Please sign in to comment.