diff options
Diffstat (limited to 'trie/secure_trie.go')
-rw-r--r-- | trie/secure_trie.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/trie/secure_trie.go b/trie/secure_trie.go index 1fde45165..20c303f31 100644 --- a/trie/secure_trie.go +++ b/trie/secure_trie.go @@ -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 } |