satellite/metainfo/metabase: use segment.Pieces to check if segment is inline

It looks that we cannot use root piece id as indicator if segment is inline as we have case in SLC satellite that inline segment have root piece id set. Pieces should be better thing to check.

Change-Id: I2377ff88861390342273f5e71871373eaf462615
This commit is contained in:
Michał Niewrzał 2021-02-24 22:14:18 +01:00
parent 846bb895e0
commit a0cc7e8c5e

View File

@ -27,7 +27,7 @@ type Segment RawSegment
// Inline returns true if segment is inline.
func (s Segment) Inline() bool {
return s.Redundancy.IsZero() && s.RootPieceID.IsZero()
return s.Redundancy.IsZero() && len(s.Pieces) == 0
}
// GetObjectExactVersion contains arguments necessary for fetching an information