From 84419583558e483c1c2e288289427c9d27232598 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 19 Jun 2025 12:44:36 +0200 Subject: [PATCH] trie: use clear builtin --- trie/secure_trie.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trie/secure_trie.go b/trie/secure_trie.go index d800ce3bf5..0424ecb6e5 100644 --- a/trie/secure_trie.go +++ b/trie/secure_trie.go @@ -270,7 +270,7 @@ func (t *StateTrie) Commit(collectLeaf bool) (common.Hash, *trienode.NodeSet) { if t.preimages != nil { t.preimages.InsertPreimage(t.secKeyCache) } - t.secKeyCache = make(map[common.Hash][]byte) + clear(t.secKeyCache) } // Commit the trie and return its modified nodeset. return t.trie.Commit(collectLeaf)