[release/1.4.6] core, core/state, trie: enterprise hand-tuned multi-level caching
(cherry picked from commit 748d1c171d
)
This commit is contained in:
@ -162,11 +162,11 @@ func (t *SecureTrie) CommitTo(db DatabaseWriter) (root common.Hash, err error) {
|
||||
}
|
||||
t.secKeyCache = make(map[string][]byte)
|
||||
}
|
||||
n, err := t.hashRoot(db)
|
||||
n, clean, err := t.hashRoot(db)
|
||||
if err != nil {
|
||||
return (common.Hash{}), err
|
||||
}
|
||||
t.root = n
|
||||
t.root = clean
|
||||
return common.BytesToHash(n.(hashNode)), nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user