[release/1.4.6] core, core/state, trie: enterprise hand-tuned multi-level caching

(cherry picked from commit 748d1c171d)
This commit is contained in:
Péter Szilágyi
2016-05-19 13:24:14 +03:00
parent 7632acf6b4
commit af53767e16
9 changed files with 245 additions and 134 deletions

View File

@ -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
}