diff --git a/cmd/neofs-cli/modules/version.go b/cmd/neofs-cli/modules/version.go index 939b3d3b93..da7cb6ed61 100644 --- a/cmd/neofs-cli/modules/version.go +++ b/cmd/neofs-cli/modules/version.go @@ -31,7 +31,6 @@ func init() { } func versionRun(cmd *cobra.Command, args []string) { - versionInfo := VersionInfo{Version: misc.Version, Build: misc.Build, Debug: misc.Debug} if flagJSON { diff --git a/cmd/neofs-node/morph.go b/cmd/neofs-node/morph.go index fc9c36a994..09f4752c1d 100644 --- a/cmd/neofs-node/morph.go +++ b/cmd/neofs-node/morph.go @@ -81,6 +81,5 @@ func registerNotificationHandlers(scHash util.Uint160, lis event.Listener, parse lis.RegisterHandler(hi) } - } } diff --git a/pkg/local_object_storage/blobstor/blobovnicza.go b/pkg/local_object_storage/blobstor/blobovnicza.go index 514813da4b..42aa404b84 100644 --- a/pkg/local_object_storage/blobstor/blobovnicza.go +++ b/pkg/local_object_storage/blobstor/blobovnicza.go @@ -840,5 +840,4 @@ func u64FromHexString(str string) uint64 { } return v - } diff --git a/pkg/local_object_storage/shard/delete.go b/pkg/local_object_storage/shard/delete.go index e6bb0d3ffa..02f43bfbdd 100644 --- a/pkg/local_object_storage/shard/delete.go +++ b/pkg/local_object_storage/shard/delete.go @@ -91,7 +91,6 @@ func (s *Shard) Delete(prm *DeletePrm) (*DeleteRes, error) { zap.Stringer("object_address", prm.addr[i]), zap.String("error", err.Error())) } - } return nil, nil diff --git a/pkg/network/transport/netmap/grpc/service.go b/pkg/network/transport/netmap/grpc/service.go index 82d872013a..a54dc92594 100644 --- a/pkg/network/transport/netmap/grpc/service.go +++ b/pkg/network/transport/netmap/grpc/service.go @@ -24,7 +24,6 @@ func New(c netmap.Service) *Server { func (s *Server) LocalNodeInfo( ctx context.Context, req *netmapGRPC.LocalNodeInfoRequest) (*netmapGRPC.LocalNodeInfoResponse, error) { - resp, err := s.srv.LocalNodeInfo(ctx, netmap.LocalNodeInfoRequestFromGRPCMessage(req)) if err != nil { // TODO: think about how we transport errors through gRPC diff --git a/pkg/services/netmap/executor.go b/pkg/services/netmap/executor.go index 192a11702b..1a48c6408b 100644 --- a/pkg/services/netmap/executor.go +++ b/pkg/services/netmap/executor.go @@ -27,7 +27,6 @@ func NewExecutionService(ni *netmap.NodeInfo, v *pkg.Version) netmap.Service { func (s *executorSvc) LocalNodeInfo( _ context.Context, _ *netmap.LocalNodeInfoRequest) (*netmap.LocalNodeInfoResponse, error) { - body := new(netmap.LocalNodeInfoResponseBody) body.SetVersion(s.version.ToV2()) body.SetNodeInfo(s.localNodeInfo) diff --git a/pkg/services/netmap/sign.go b/pkg/services/netmap/sign.go index 0eef0d8129..6c3f77f77b 100644 --- a/pkg/services/netmap/sign.go +++ b/pkg/services/netmap/sign.go @@ -24,7 +24,6 @@ func NewSignService(key *ecdsa.PrivateKey, svc netmap.Service) netmap.Service { func (s *signService) LocalNodeInfo( ctx context.Context, req *netmap.LocalNodeInfoRequest) (*netmap.LocalNodeInfoResponse, error) { - resp, err := s.sigSvc.HandleUnaryRequest(ctx, req, func(ctx context.Context, req interface{}) (util.ResponseMessage, error) { return s.svc.LocalNodeInfo(ctx, req.(*netmap.LocalNodeInfoRequest)) diff --git a/pkg/services/object/acl/acl.go b/pkg/services/object/acl/acl.go index 795a8ac1c2..91452fcfba 100644 --- a/pkg/services/object/acl/acl.go +++ b/pkg/services/object/acl/acl.go @@ -187,7 +187,6 @@ func (b Service) Put(ctx context.Context) (object.PutObjectStreamer, error) { func (b Service) Head( ctx context.Context, request *object.HeadRequest) (*object.HeadResponse, error) { - cid, err := getContainerIDFromRequest(request) if err != nil { return nil, err @@ -264,7 +263,6 @@ func (b Service) Search(request *object.SearchRequest, stream objectSvc.SearchSt func (b Service) Delete( ctx context.Context, request *object.DeleteRequest) (*object.DeleteResponse, error) { - cid, err := getContainerIDFromRequest(request) if err != nil { return nil, err @@ -335,7 +333,6 @@ func (b Service) GetRange(request *object.GetRangeRequest, stream objectSvc.GetO func (b Service) GetRangeHash( ctx context.Context, request *object.GetRangeHashRequest) (*object.GetRangeHashResponse, error) { - cid, err := getContainerIDFromRequest(request) if err != nil { return nil, err @@ -446,9 +443,7 @@ func (b Service) findRequestInfo( req metaWithToken, cid *container.ID, op acl.Operation) (info requestInfo, err error) { - - // fetch actual container - cnr, err := b.containers.Get(cid) + cnr, err := b.containers.Get(cid) // fetch actual container if err != nil || cnr.OwnerID() == nil { return info, ErrUnknownContainer } @@ -561,7 +556,6 @@ func getObjectOwnerFromMessage(req interface{}) (id *owner.ID, err error) { default: return nil, errors.New("unsupported request type") } - } // main check function for basic ACL diff --git a/pkg/services/object/acl/classifier.go b/pkg/services/object/acl/classifier.go index e08ce1c9a4..81c8b78f11 100644 --- a/pkg/services/object/acl/classifier.go +++ b/pkg/services/object/acl/classifier.go @@ -48,7 +48,6 @@ func (c SenderClassifier) Classify( req metaWithToken, cid *container.ID, cnr *container.Container) (role acl.Role, isIR bool, key []byte, err error) { - if cid == nil { return 0, false, nil, errors.Wrap(ErrMalformedRequest, "container id is not set") } @@ -146,9 +145,7 @@ func (c SenderClassifier) isInnerRingKey(owner []byte) (bool, error) { func (c SenderClassifier) isContainerKey( owner, cid []byte, cnr *container.Container) (bool, error) { - - // first check current netmap - nm, err := core.GetLatestNetworkMap(c.netmap) + nm, err := core.GetLatestNetworkMap(c.netmap) // first check current netmap if err != nil { return false, err } @@ -174,7 +171,6 @@ func lookupKeyInContainer( nm *netmap.Netmap, owner, cid []byte, cnr *container.Container) (bool, error) { - cnrNodes, err := nm.GetContainerNodes(cnr.PlacementPolicy(), cid) if err != nil { return false, err diff --git a/pkg/services/object_manager/transformer/transformer.go b/pkg/services/object_manager/transformer/transformer.go index cf036aa82f..5edd1c6584 100644 --- a/pkg/services/object_manager/transformer/transformer.go +++ b/pkg/services/object_manager/transformer/transformer.go @@ -210,7 +210,6 @@ func (s *payloadSizeLimiter) release(close bool) (*AccessIdentifiers, error) { func writeHashes(hashers []*payloadChecksumHasher) { for i := range hashers { hashers[i].checksumWriter(hashers[i].hasher.Sum(nil)) - } }