mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core/rawdb: delete unused func
This commit is contained in:
parent
1522206a59
commit
12bbaaeb58
2 changed files with 3 additions and 26 deletions
|
|
@ -284,29 +284,6 @@ func DeleteTrieNode(db ethdb.KeyValueWriter, owner common.Hash, path []byte, has
|
|||
}
|
||||
}
|
||||
|
||||
// ExistsTrieNode checks for the presence of the trie node with the specified
|
||||
// account hash and node path, regardless of the node hash.
|
||||
//
|
||||
// hashScheme-based lookup requires the following:
|
||||
// - hash
|
||||
//
|
||||
// pathScheme-based lookup requires the following:
|
||||
// - owner
|
||||
// - path
|
||||
func ExistsTrieNode(db ethdb.KeyValueReader, owner common.Hash, path []byte, hash common.Hash, scheme string) bool {
|
||||
switch scheme {
|
||||
case HashScheme:
|
||||
return HasLegacyTrieNode(db, hash)
|
||||
case PathScheme:
|
||||
if owner == (common.Hash{}) {
|
||||
return ExistsAccountTrieNode(db, path)
|
||||
}
|
||||
return ExistsStorageTrieNode(db, owner, path)
|
||||
default:
|
||||
panic(fmt.Sprintf("Unknown scheme %v", scheme))
|
||||
}
|
||||
}
|
||||
|
||||
// ReadStateScheme reads the state scheme of persistent state, or none
|
||||
// if the state is not present in database.
|
||||
func ReadStateScheme(db ethdb.Reader) string {
|
||||
|
|
|
|||
|
|
@ -44,11 +44,11 @@ var ErrAlreadyProcessed = errors.New("already processed")
|
|||
const maxFetchesPerDepth = 16384
|
||||
|
||||
var (
|
||||
// deletionGauge is the metric to track how many trie nodes are deleted
|
||||
// in total during the sync process.
|
||||
// deletionGauge is the metric to track how many trie node deletions
|
||||
// are performed in total during the sync process.
|
||||
deletionGauge = metrics.NewRegisteredGauge("trie/sync/delete", nil)
|
||||
|
||||
// lookupGauge is the metric to track how many trie nodes lookup are
|
||||
// lookupGauge is the metric to track how many trie node lookups are
|
||||
// performed to determine if node needs to be deleted.
|
||||
lookupGauge = metrics.NewRegisteredGauge("trie/sync/lookup", nil)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue