From 19ca9072237254f1b32b18c19e75586d8bb1c88a Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Tue, 1 Apr 2025 13:16:11 +0300 Subject: [PATCH] [#1689] treesvc: Untie `createConnection()` from `Service` struct Change-Id: I6212de4b81afe8c2516981a7bb2fea099c7df773 Signed-off-by: Evgenii Stratonikov --- pkg/services/tree/sync.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/services/tree/sync.go b/pkg/services/tree/sync.go index 1c3521344..92ff97c1c 100644 --- a/pkg/services/tree/sync.go +++ b/pkg/services/tree/sync.go @@ -301,7 +301,7 @@ func (s *Service) synchronizeTree(ctx context.Context, cid cid.ID, from uint64, return false } - cc, err := s.createConnection(a) + cc, err := createConnection(a) if err != nil { s.log.Warn(ctx, logs.TreeFailedToConnectForTreeSynchronization, zap.Error(err), zap.String("address", addr)) return false @@ -339,7 +339,7 @@ func (s *Service) synchronizeTree(ctx context.Context, cid cid.ID, from uint64, return from } -func (*Service) createConnection(a network.Address) (*grpc.ClientConn, error) { +func createConnection(a network.Address) (*grpc.ClientConn, error) { return grpc.NewClient(a.URIAddr(), grpc.WithChainUnaryInterceptor( qos.NewAdjustOutgoingIOTagUnaryClientInterceptor(),