Skip to content

Commit ac04ead

Browse files
authored
Revert "core/rawdb: remove unused transition status state accessors (#30433)"
This reverts commit ae70744.
1 parent 8dd2962 commit ac04ead

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

core/rawdb/accessors_metadata.go

+13
Original file line numberDiff line numberDiff line change
@@ -174,3 +174,16 @@ func UpdateUncleanShutdownMarker(db ethdb.KeyValueStore) {
174174
log.Warn("Failed to write unclean-shutdown marker", "err", err)
175175
}
176176
}
177+
178+
// ReadTransitionStatus retrieves the eth2 transition status from the database
179+
func ReadTransitionStatus(db ethdb.KeyValueReader) []byte {
180+
data, _ := db.Get(transitionStatusKey)
181+
return data
182+
}
183+
184+
// WriteTransitionStatus stores the eth2 transition status to the database
185+
func WriteTransitionStatus(db ethdb.KeyValueWriter, data []byte) {
186+
if err := db.Put(transitionStatusKey, data); err != nil {
187+
log.Crit("Failed to store the eth2 transition status", "err", err)
188+
}
189+
}

0 commit comments

Comments
 (0)