From c9cd48a8fb4f73ad0cd64f29a591dd3b47a5f7be Mon Sep 17 00:00:00 2001 From: jsvisa Date: Sat, 25 Oct 2025 03:19:20 +0000 Subject: [PATCH] triedb/pathdb: no need lock Signed-off-by: jsvisa --- triedb/pathdb/lookup.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/triedb/pathdb/lookup.go b/triedb/pathdb/lookup.go index fee2573a35..37d90c4ce3 100644 --- a/triedb/pathdb/lookup.go +++ b/triedb/pathdb/lookup.go @@ -335,7 +335,6 @@ func (l *lookup) addStorageNodes(state common.Hash, nodes map[common.Hash]map[st var ( wg sync.WaitGroup - locks [storageNodesShardCount]sync.Mutex tasks = make([][]shardTask, storageNodesShardCount) ) @@ -361,9 +360,6 @@ func (l *lookup) addStorageNodes(state common.Hash, nodes map[common.Hash]map[st return } - locks[shardIdx].Lock() - defer locks[shardIdx].Unlock() - shard := l.storageNodes[shardIdx] for _, task := range taskList { key := makeTrienodeKey(task.accountHash, task.path) @@ -477,7 +473,6 @@ func (l *lookup) removeStorageNodes(state common.Hash, nodes map[common.Hash]map var ( eg errgroup.Group - locks [storageNodesShardCount]sync.Mutex tasks = make([][]shardTask, storageNodesShardCount) ) @@ -501,9 +496,6 @@ func (l *lookup) removeStorageNodes(state common.Hash, nodes map[common.Hash]map return nil } - locks[shardIdx].Lock() - defer locks[shardIdx].Unlock() - shard := l.storageNodes[shardIdx] for _, task := range taskList { key := makeTrienodeKey(task.accountHash, task.path)