use maps.Copy instead of manual map copy

This commit is contained in:
Matt D 2025-05-02 10:00:22 +05:00 committed by GitHub
parent 701df4baad
commit e2cd2b8f92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -279,9 +279,7 @@ func (s *nodeSet) write(batch ethdb.Batch, clean *fastcache.Cache) int {
if len(s.accountNodes) > 0 { if len(s.accountNodes) > 0 {
nodes[common.Hash{}] = s.accountNodes nodes[common.Hash{}] = s.accountNodes
} }
for owner, subset := range s.storageNodes { maps.Copy(nodes, s.storageNodes)
nodes[owner] = subset
}
return writeNodes(batch, nodes, clean) return writeNodes(batch, nodes, clean)
} }