remove unneeded code

This commit is contained in:
user 2022-06-30 22:57:15 +08:00
parent 978827202f
commit d46ea0ebf7
2 changed files with 0 additions and 21 deletions

View file

@ -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)

View file

@ -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