mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Revert "trie: add getter for preimage store in trie.Database (#28155)"
This reverts commit 9a178056b8.
This commit is contained in:
parent
c53fb8437b
commit
acb7eea122
1 changed files with 0 additions and 9 deletions
|
|
@ -189,15 +189,6 @@ func (db *Database) WritePreimages() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Preimage retrieves a cached trie node pre-image from memory. If it cannot be
|
|
||||||
// found cached, the method queries the persistent database for the content.
|
|
||||||
func (db *Database) Preimage(hash common.Hash) []byte {
|
|
||||||
if db.preimages == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return db.preimages.preimage(hash)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Cap iteratively flushes old but still referenced trie nodes until the total
|
// Cap iteratively flushes old but still referenced trie nodes until the total
|
||||||
// memory usage goes below the given threshold. The held pre-images accumulated
|
// memory usage goes below the given threshold. The held pre-images accumulated
|
||||||
// up to this point will be flushed in case the size exceeds the threshold.
|
// up to this point will be flushed in case the size exceeds the threshold.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue