p2p: initialize maps with known size (#27229)

This commit is contained in:
ucwong
2023-05-10 10:52:26 +02:00
committed by GitHub
parent a742943c78
commit ae7db289b8
10 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -439,7 +439,7 @@ func testNodes(keys []*ecdsa.PrivateKey) []*enode.Node {
type mapResolver map[string]string
func newMapResolver(maps ...map[string]string) mapResolver {
mr := make(mapResolver)
mr := make(mapResolver, len(maps))
for _, m := range maps {
mr.add(m)
}