[#95] transformer: Set parent version

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-06-23 13:34:42 +03:00
parent 9d40228cec
commit aa8ffebc63

View file

@ -82,10 +82,12 @@ func (s *payloadSizeLimiter) initialize() {
if ln := len(s.previous); ln > 0 { if ln := len(s.previous); ln > 0 {
// initialize parent object once (after 1st object) // initialize parent object once (after 1st object)
if ln == 1 { if ln == 1 {
ver := version.Current()
s.parent = fromObject(s.current) s.parent = fromObject(s.current)
s.parent.ResetRelations() s.parent.ResetRelations()
s.parent.SetSignature(nil) s.parent.SetSignature(nil)
s.parent.SetAttributes(s.parAttrs...) s.parent.SetAttributes(s.parAttrs...)
s.parent.SetVersion(&ver)
s.parentHashers = append(s.parentHashers[:0], s.currentHashers...) s.parentHashers = append(s.parentHashers[:0], s.currentHashers...)
} }