[#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 <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-07-01 15:18:31 +03:00 committed by Leonard Lyubich
parent 76abe7d6cb
commit d809155efa

View file

@ -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()),