mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-10 22:13:47 +00:00
remove unneeded code
This commit is contained in:
parent
978827202f
commit
d46ea0ebf7
2 changed files with 0 additions and 21 deletions
|
|
@ -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.
|
// ReadHeadHeaderHash retrieves the hash of the current canonical head header.
|
||||||
func ReadHeadHeaderHash(db ethdb.KeyValueReader) common.Hash {
|
func ReadHeadHeaderHash(db ethdb.KeyValueReader) common.Hash {
|
||||||
data, _ := db.Get(headHeaderKey)
|
data, _ := db.Get(headHeaderKey)
|
||||||
|
|
|
||||||
|
|
@ -84,9 +84,6 @@ var (
|
||||||
// transitionStatusKey tracks the eth2 transition status.
|
// transitionStatusKey tracks the eth2 transition status.
|
||||||
transitionStatusKey = []byte("eth2-transition")
|
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).
|
// 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
|
headerPrefix = []byte("h") // headerPrefix + num (uint64 big endian) + hash -> header
|
||||||
headerTDSuffix = []byte("t") // headerPrefix + num (uint64 big endian) + hash + headerTDSuffix -> td
|
headerTDSuffix = []byte("t") // headerPrefix + num (uint64 big endian) + hash + headerTDSuffix -> td
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue