[#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>
remotes/KirillovDenis/release/v0.21.1
Leonard Lyubich 2020-12-02 11:36:07 +03:00 committed by Alex Vanin
parent b8e8e1e80d
commit 6cddc91cbf
1 changed files with 1 additions and 3 deletions

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)
}