[#257] Upgrade NeoFS API Go module

New version contains fix for `object.GetRangeResponse` message type.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-05-30 22:05:35 +03:00 committed by LeL
parent 3953c2166e
commit 6cb513c976
31 changed files with 46 additions and 139 deletions

View file

@ -88,13 +88,8 @@ func NewContainerFromV2(c *container.Container) *Container {
// CalculateID calculates container identifier
// based on its structure.
func CalculateID(c *Container) cid.ID {
data, err := c.ToV2().StableMarshal(nil)
if err != nil {
panic(err)
}
var id cid.ID
id.SetSHA256(sha256.Sum256(data))
id.SetSHA256(sha256.Sum256(c.ToV2().StableMarshal(nil)))
return id
}
@ -194,7 +189,7 @@ func (c *Container) SetSignature(sig *neofscrypto.Signature) {
// Marshal marshals Container into a protobuf binary form.
func (c *Container) Marshal() ([]byte, error) {
return c.v2.StableMarshal(nil)
return c.v2.StableMarshal(nil), nil
}
// Unmarshal unmarshals protobuf binary representation of Container.