From 291f9e809a28346d296af6a7514b5b32d80810d5 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 26 Apr 2023 17:12:04 +0300 Subject: [PATCH] [#288] pilorama: Remove getMeta() wrapper Signed-off-by: Evgenii Stratonikov --- pkg/local_object_storage/pilorama/forest.go | 2 +- pkg/local_object_storage/pilorama/inmemory.go | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/pkg/local_object_storage/pilorama/forest.go b/pkg/local_object_storage/pilorama/forest.go index 1110927f..4286bdef 100644 --- a/pkg/local_object_storage/pilorama/forest.go +++ b/pkg/local_object_storage/pilorama/forest.go @@ -142,7 +142,7 @@ func (f *memoryForest) TreeGetMeta(_ context.Context, cid cid.ID, treeID string, return Meta{}, 0, ErrTreeNotFound } - return s.getMeta(nodeID), s.infoMap[nodeID].Parent, nil + return s.infoMap[nodeID].Meta, s.infoMap[nodeID].Parent, nil } // TreeGetChildren implements the Forest interface. diff --git a/pkg/local_object_storage/pilorama/inmemory.go b/pkg/local_object_storage/pilorama/inmemory.go index b836d4fb..1bde312a 100644 --- a/pkg/local_object_storage/pilorama/inmemory.go +++ b/pkg/local_object_storage/pilorama/inmemory.go @@ -204,8 +204,3 @@ func (t tree) getByPath(attr string, path []string, latest bool) []Node { return nodes } - -// getMeta returns meta information of node n. -func (t tree) getMeta(n Node) Meta { - return t.infoMap[n].Meta -}