trie: make hasher parallel when number of changes are large (#20488)

* trie: make hasher parallel when number of changes are large

* trie: remove unused field dirtyCount

* trie: rename unhashedCount/unhashed
This commit is contained in:
Martin Holst Swende
2020-02-04 13:02:38 +01:00
committed by GitHub
parent 711ed74e09
commit a1313b5b1e
5 changed files with 42 additions and 15 deletions

View File

@ -176,7 +176,7 @@ func (t *SecureTrie) NodeIterator(start []byte) NodeIterator {
// The caller must not hold onto the return value because it will become
// invalid on the next call to hashKey or secKey.
func (t *SecureTrie) hashKey(key []byte) []byte {
h := newHasher()
h := newHasher(false)
h.sha.Reset()
h.sha.Write(key)
buf := h.sha.Sum(t.hashKeyBuf[:0])