Revert "core/rawdb: remove unused transition status state accessors" (#30449)

Reverts ethereum/go-ethereum#30433
pull/30455/head
Guillaume Ballet 2 months ago committed by GitHub
parent 8032b63f16
commit d09600fdf9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 13
      core/rawdb/accessors_metadata.go

@ -174,3 +174,16 @@ func UpdateUncleanShutdownMarker(db ethdb.KeyValueStore) {
log.Warn("Failed to write unclean-shutdown marker", "err", err) 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)
}
}

Loading…
Cancel
Save