forked from TrueCloudLab/frostfs-node
[#607] services/control: Fix incorrect allocation in NetmapSnapshot
Fix make with length + subsequent append. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
f8ee6b1164
commit
8eadf18e01
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ func nodesFromAPI(apiNodes netmapAPI.Nodes) []*control.NodeInfo {
|
|||
node := new(control.NodeInfo)
|
||||
node.SetPublicKey(apiNode.PublicKey())
|
||||
|
||||
addrs := make([]string, apiNode.NumberOfAddresses())
|
||||
addrs := make([]string, 0, apiNode.NumberOfAddresses())
|
||||
netmapAPI.IterateAllAddresses(apiNode.NodeInfo, func(s string) {
|
||||
addrs = append(addrs, s)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue