Skip to content

Commit c0460c1

Browse files
committed
triedb/pathdb: no need lock
Signed-off-by: jsvisa <[email protected]>
1 parent 4556967 commit c0460c1

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

triedb/pathdb/lookup.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ func (l *lookup) addStorageNodes(state common.Hash, nodes map[common.Hash]map[st
335335

336336
var (
337337
wg sync.WaitGroup
338-
locks [storageNodesShardCount]sync.Mutex
339338
tasks = make([][]shardTask, storageNodesShardCount)
340339
)
341340

@@ -361,9 +360,6 @@ func (l *lookup) addStorageNodes(state common.Hash, nodes map[common.Hash]map[st
361360
return
362361
}
363362

364-
locks[shardIdx].Lock()
365-
defer locks[shardIdx].Unlock()
366-
367363
shard := l.storageNodes[shardIdx]
368364
for _, task := range taskList {
369365
key := makeTrienodeKey(task.accountHash, task.path)
@@ -477,7 +473,6 @@ func (l *lookup) removeStorageNodes(state common.Hash, nodes map[common.Hash]map
477473

478474
var (
479475
eg errgroup.Group
480-
locks [storageNodesShardCount]sync.Mutex
481476
tasks = make([][]shardTask, storageNodesShardCount)
482477
)
483478

@@ -501,9 +496,6 @@ func (l *lookup) removeStorageNodes(state common.Hash, nodes map[common.Hash]map
501496
return nil
502497
}
503498

504-
locks[shardIdx].Lock()
505-
defer locks[shardIdx].Unlock()
506-
507499
shard := l.storageNodes[shardIdx]
508500
for _, task := range taskList {
509501
key := makeTrienodeKey(task.accountHash, task.path)

0 commit comments

Comments
 (0)