diff --git a/core/rawdb/accessors_chain.go b/core/rawdb/accessors_chain.go index 4fbba22b55..8ea2e2ca72 100644 --- a/core/rawdb/accessors_chain.go +++ b/core/rawdb/accessors_chain.go @@ -168,24 +168,6 @@ func DeleteHeaderNumber(db ethdb.KeyValueWriter, hash common.Hash) { } } -// ReadAncientThrowLastBlock retrieves the hash of the finalized block. -func ReadAncientThrowLastBlockNumber(db ethdb.KeyValueReader) *uint64 { - data, _ := db.Get(ancientThrowLastBlock) - if len(data) != 8 { - return nil - } - number := binary.BigEndian.Uint64(data) - return &number -} - -// WriteAncientThrowLastBlock stores the hash of the finalized block. -func WriteAncientThrowLastBlockNumber(db ethdb.KeyValueWriter, number uint64) { - enc := encodeBlockNumber(number) - if err := db.Put(ancientThrowLastBlock, enc); err != nil { - log.Crit("Failed to store last throwed ancient block's hash", "err", err) - } -} - // ReadHeadHeaderHash retrieves the hash of the current canonical head header. func ReadHeadHeaderHash(db ethdb.KeyValueReader) common.Hash { data, _ := db.Get(headHeaderKey) diff --git a/core/rawdb/schema.go b/core/rawdb/schema.go index dce29a2d14..041c9f0449 100644 --- a/core/rawdb/schema.go +++ b/core/rawdb/schema.go @@ -84,9 +84,6 @@ var ( // transitionStatusKey tracks the eth2 transition status. transitionStatusKey = []byte("eth2-transition") - // ancientThrowLastBlock tracks the last recent ancient block that has been thrown - ancientThrowLastBlock = []byte("AncientThrowLastBlock") - // Data item prefixes (use single byte to avoid mixing data types, avoid `i`, used for indexes). headerPrefix = []byte("h") // headerPrefix + num (uint64 big endian) + hash -> header headerTDSuffix = []byte("t") // headerPrefix + num (uint64 big endian) + hash + headerTDSuffix -> td