Merge pull request #4783 from yyforyongyu/autopilot-code-fix

autopilot: fix returned map size in mergeNodeMaps
This commit is contained in:
Conner Fromknecht 2020-11-19 11:10:48 -08:00 committed by GitHub
commit 1b97bcdac1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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