diff --git a/pkg/local_object_storage/pilorama/forest_test.go b/pkg/local_object_storage/pilorama/forest_test.go index e31e5fe9a1..d7ddbc700f 100644 --- a/pkg/local_object_storage/pilorama/forest_test.go +++ b/pkg/local_object_storage/pilorama/forest_test.go @@ -859,7 +859,7 @@ func testTreeGetByPath(t *testing.T, s Forest) { single := mf.treeMap[cid.String()+"/"+treeID] t.Run("test meta", func(t *testing.T) { for i := 0; i < 6; i++ { - require.Equal(t, uint64(i), single.infoMap[Node(i+1)].Timestamp) + require.Equal(t, uint64(i), single.infoMap[Node(i+1)].Meta.Time) } }) } diff --git a/pkg/local_object_storage/pilorama/inmemory.go b/pkg/local_object_storage/pilorama/inmemory.go index b9a24158c1..8a6a3d8635 100644 --- a/pkg/local_object_storage/pilorama/inmemory.go +++ b/pkg/local_object_storage/pilorama/inmemory.go @@ -2,9 +2,8 @@ package pilorama // nodeInfo couples parent and metadata. type nodeInfo struct { - Parent Node - Meta Meta - Timestamp Timestamp + Parent Node + Meta Meta } // state represents state being replicated. @@ -98,7 +97,7 @@ func (s *state) do(op *Move) LogMove { } if !ok { - p.Timestamp = op.Time + p.Meta.Time = op.Time } else { s.removeChild(op.Child, p.Parent) } @@ -206,7 +205,7 @@ func (t tree) get(attr string, path []string, latest bool) []Node { fileName := string(info.Meta.GetAttr(attr)) if fileName == path[len(path)-1] { if latest { - if info.Timestamp >= lastTs { + if info.Meta.Time >= lastTs { nodes = append(nodes[:0], children[i]) } } else {