[#227] transformer: Inherit parent header in linking object

In previous implementation linking object inherited only ID of the parent
object. From now it inherits full header like last child.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-12-02 11:36:07 +03:00 committed by Alex Vanin
parent b8e8e1e80d
commit 6cddc91cbf

View file

@ -215,10 +215,8 @@ func writeHashes(hashers []*payloadChecksumHasher) {
}
func (s *payloadSizeLimiter) initializeLinking() {
id := s.current.ParentID()
s.current = fromObject(s.current)
s.current.SetParentID(id)
s.current.SetParent(s.parent.Object().SDK())
s.current.SetChildren(s.previous...)
s.current.SetSplitID(s.splitID)
}