From acb7eea1220592a81141d3646440fc261ff9cfae Mon Sep 17 00:00:00 2001 From: devopsbo3 <69951731+devopsbo3@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:27:53 -0600 Subject: [PATCH] Revert "trie: add getter for preimage store in trie.Database (#28155)" This reverts commit 9a178056b897517c8d1456ac9d3e26dc49ca12fa. --- trie/database.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/trie/database.go b/trie/database.go index 535ad87d72..2915ff9484 100644 --- a/trie/database.go +++ b/trie/database.go @@ -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 // 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.