From 7c1432aa57ab54900193ab940dec265d3c480db5 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Fri, 2 Jul 2021 08:59:02 +0300 Subject: [PATCH] [#660] services/container: Don't check container format in Put Storage node should only reflect container Put requests to sidechain w/o any validation. All verification steps are performed by IR. Signed-off-by: Leonard Lyubich --- pkg/services/container/morph/executor.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/services/container/morph/executor.go b/pkg/services/container/morph/executor.go index 5f072c7a0..9a8c15f2a 100644 --- a/pkg/services/container/morph/executor.go +++ b/pkg/services/container/morph/executor.go @@ -2,7 +2,6 @@ package container import ( "context" - "fmt" "github.com/nspcc-dev/neofs-api-go/pkg" eaclSDK "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" @@ -28,10 +27,7 @@ func NewExecutor(w *wrapper.Wrapper) containerSvc.ServiceExecutor { } func (s *morphExecutor) Put(ctx containerSvc.ContextWithToken, body *container.PutRequestBody) (*container.PutResponseBody, error) { - cnr, err := containerSDK.NewVerifiedFromV2(body.GetContainer()) - if err != nil { - return nil, fmt.Errorf("invalid format of the container structure: %w", err) - } + cnr := containerSDK.NewContainerFromV2(body.GetContainer()) cnr.SetSignature( pkg.NewSignatureFromV2(body.GetSignature()),