Revert "trie: make fullnode children hash calculation concurrently (#15131)" (#15889)

This reverts commit 0f7fbb85d6.
This commit is contained in:
Péter Szilágyi
2018-01-15 15:32:14 +02:00
committed by GitHub
parent 18a7d31338
commit 216e584899
3 changed files with 32 additions and 88 deletions

View File

@ -199,10 +199,10 @@ func (t *SecureTrie) secKey(key []byte) []byte {
// invalid on the next call to hashKey or secKey.
func (t *SecureTrie) hashKey(key []byte) []byte {
h := newHasher(0, 0)
calculator := h.newCalculator()
calculator.sha.Write(key)
buf := calculator.sha.Sum(t.hashKeyBuf[:0])
h.returnCalculator(calculator)
h.sha.Reset()
h.sha.Write(key)
buf := h.sha.Sum(t.hashKeyBuf[:0])
returnHasherToPool(h)
return buf
}