autopilot: fix returned map size in mergeNodeMaps

This commit is contained in:
yyforyongyu 2020-11-18 15:59:37 +08:00
parent 1efef51268
commit 0ace42649e
No known key found for this signature in database
GPG Key ID: 9BCD95C4FF296868

View File

@ -364,7 +364,7 @@ func mergeNodeMaps(c map[NodeID]LocalChannel,
numNodes += len(skip)
}
res := make(map[NodeID]struct{}, len(c)+numNodes)
res := make(map[NodeID]struct{}, numNodes)
for nodeID := range c {
res[nodeID] = struct{}{}
}