From d809155efad764573a0a35c3c4305177ae4e5608 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 1 Jul 2021 15:18:31 +0300 Subject: [PATCH] [#321] pkg/client: Do not verify container body in GetContainer There is a problem when containers with newer versions considered invalid by Client. This does not allow receiving correct containers of new versions through the client. Fix the problem by turning off version check in `Client.GetContainer`. Signed-off-by: Leonard Lyubich --- pkg/client/container.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/client/container.go b/pkg/client/container.go index ae4ab369..b021813a 100644 --- a/pkg/client/container.go +++ b/pkg/client/container.go @@ -173,10 +173,7 @@ func (c *clientImpl) GetContainer(ctx context.Context, id *cid.ID, opts ...CallO body := resp.GetBody() - cnr, err := container.NewVerifiedFromV2(body.GetContainer()) - if err != nil { - return nil, err - } + cnr := container.NewContainerFromV2(body.GetContainer()) cnr.SetSessionToken( session.NewTokenFromV2(body.GetSessionToken()),