From b0c2755ce335c8489de42ee77802ce8115953d38 Mon Sep 17 00:00:00 2001 From: cuiweixie Date: Fri, 26 Sep 2025 00:01:02 +0800 Subject: [PATCH] triedb: opt storageKey --- triedb/pathdb/lookup.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/triedb/pathdb/lookup.go b/triedb/pathdb/lookup.go index 8b092730f8..99057d668f 100644 --- a/triedb/pathdb/lookup.go +++ b/triedb/pathdb/lookup.go @@ -28,8 +28,8 @@ import ( // storageKey returns a key for uniquely identifying the storage slot. func storageKey(accountHash common.Hash, slotHash common.Hash) [64]byte { var key [64]byte - copy(key[:32], accountHash[:]) - copy(key[32:], slotHash[:]) + *(*[32]byte)(key[32:]) = slotHash + *(*[32]byte)(key[:32]) = accountHash return key }