From 06137dbf8e4136576c26ea65719f9862c88a3a6a Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Mon, 19 Dec 2022 18:18:41 +0300 Subject: [PATCH] [#2165] services/tree: Do not export `synchronizeAllTrees` It is used only privately. Signed-off-by: Evgenii Stratonikov --- pkg/services/tree/sync.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/services/tree/sync.go b/pkg/services/tree/sync.go index a833d3852..f2695e49d 100644 --- a/pkg/services/tree/sync.go +++ b/pkg/services/tree/sync.go @@ -26,10 +26,10 @@ var ErrNotInContainer = errors.New("node is not in container") const defaultSyncWorkerCount = 20 -// SynchronizeAllTrees synchronizes all the trees of the container. It fetches +// synchronizeAllTrees synchronizes all the trees of the container. It fetches // tree IDs from the other container nodes. Returns ErrNotInContainer if the node // is not included in the container. -func (s *Service) SynchronizeAllTrees(ctx context.Context, cid cid.ID) error { +func (s *Service) synchronizeAllTrees(ctx context.Context, cid cid.ID) error { nodes, pos, err := s.getContainerNodes(cid) if err != nil { return fmt.Errorf("can't get container nodes: %w", err) @@ -283,7 +283,7 @@ func (s *Service) syncLoop(ctx context.Context) { defer wg.Done() s.log.Debug("syncing container trees...", zap.Stringer("cid", cnr)) - err := s.SynchronizeAllTrees(ctx, cnr) + err := s.synchronizeAllTrees(ctx, cnr) if err != nil { s.log.Error("could not sync trees", zap.Stringer("cid", cnr), zap.Error(err)) return