[#174] Update to latest neofs-api-go changes

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-11-16 12:43:52 +03:00 committed by Alex Vanin
parent e98b77133c
commit 3de8febe57
47 changed files with 190 additions and 216 deletions

View file

@ -23,8 +23,8 @@ type validatingTarget struct {
}
func (t *validatingTarget) WriteHeader(obj *object.RawObject) error {
cs := obj.GetPayloadChecksum()
switch typ := cs.GetType(); typ {
cs := obj.PayloadChecksum()
switch typ := cs.Type(); typ {
default:
return errors.Errorf("(%T) unsupported payload checksum type %v", t, typ)
case pkg.ChecksumSHA256:
@ -33,7 +33,7 @@ func (t *validatingTarget) WriteHeader(obj *object.RawObject) error {
t.hash = tz.New()
}
t.checksum = cs.GetSum()
t.checksum = cs.Sum()
if err := t.fmt.Validate(obj.Object()); err != nil {
return errors.Wrapf(err, "(%T) coult not validate object format", t)