forked from TrueCloudLab/frostfs-sdk-go
[#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:
parent
3953c2166e
commit
6cb513c976
31 changed files with 46 additions and 139 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue