Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linter issues #1644

Merged
merged 2 commits into from
Jul 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/local_object_storage/internal/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func AddressField(addr interface{}) zap.Field {
return zap.Any("address", addr)
}

// AddressField returns logger's field for operation type.
// OpField returns logger's field for operation type.
func OpField(op string) zap.Field {
return zap.String("op", op)
}
3 changes: 2 additions & 1 deletion pkg/services/tree/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/nspcc-dev/neofs-node/pkg/network"
"google.golang.org/grpc"
"google.golang.org/grpc/connectivity"
"google.golang.org/grpc/credentials/insecure"
)

type clientCache struct {
Expand Down Expand Up @@ -85,7 +86,7 @@ func dialTreeService(ctx context.Context, netmapAddr string) (*grpc.ClientConn,

// FIXME(@fyrchik): ugly hack #1322
if !strings.HasPrefix(netAddr.URIAddr(), "grpcs:") {
opts = append(opts, grpc.WithInsecure())
opts = append(opts, grpc.WithTransportCredentials(insecure.NewCredentials()))
}

ctx, cancel := context.WithTimeout(ctx, defaultClientConnectTimeout)
Expand Down
3 changes: 2 additions & 1 deletion pkg/services/tree/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/nspcc-dev/neofs-node/pkg/network"
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)

// Synchronize tries to synchronize log starting from the last stored height.
Expand All @@ -33,7 +34,7 @@ func (s *Service) Synchronize(ctx context.Context, cid cid.ID, treeID string) er
return false
}

cc, err := grpc.DialContext(ctx, a.URIAddr(), grpc.WithInsecure())
cc, err := grpc.DialContext(ctx, a.URIAddr(), grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
// Failed to connect, try the next address.
return false
Expand Down