eth, trie: fix tracer GC which accidentally pruned the metaroot
This commit is contained in:
@ -431,6 +431,11 @@ func (db *Database) reference(child common.Hash, parent common.Hash) {
|
||||
|
||||
// Dereference removes an existing reference from a root node.
|
||||
func (db *Database) Dereference(root common.Hash) {
|
||||
// Sanity check to ensure that the meta-root is not removed
|
||||
if root == (common.Hash{}) {
|
||||
log.Error("Attempted to dereference the trie cache meta root")
|
||||
return
|
||||
}
|
||||
db.lock.Lock()
|
||||
defer db.lock.Unlock()
|
||||
|
||||
|
Reference in New Issue
Block a user