From cfa60989193b0086520b22fae6eb0c3d9edcaeba Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Mon, 23 May 2022 09:20:57 +0300 Subject: [PATCH] [#416] Make emptyOID a local variable Signed-off-by: Denis Kirillov --- internal/neofs/tree.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/neofs/tree.go b/internal/neofs/tree.go index 9e84a771..c985c703 100644 --- a/internal/neofs/tree.go +++ b/internal/neofs/tree.go @@ -60,8 +60,6 @@ const ( maxGetSubTreeDepth = 10 // current limit on storage node side ) -var emptyOID oid.ID - // NewTreeClient creates instance of TreeClient using provided address and create grpc connection. func NewTreeClient(addr string, key *keys.PrivateKey) (*TreeClient, error) { conn, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials())) @@ -309,6 +307,8 @@ func (c *TreeClient) getSubTreeLatestVersions(ctx context.Context, cnrID *cid.ID return nil, err } + var emptyOID oid.ID + latestVersions := make(map[string]*TreeNode, len(subTree)) for _, node := range subTree { treeNode, err := newTreeNode(node)