[#1445] services/tree: Cache the list of container nodes

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-05-30 20:46:29 +03:00 committed by fyrchik
parent a2edfec0c3
commit 39f47f61c6
4 changed files with 142 additions and 55 deletions

View file

@ -15,7 +15,7 @@ import (
// Synchronize tries to synchronize log starting from the last stored height.
func (s *Service) Synchronize(ctx context.Context, cid cid.ID, treeID string) error {
nodes, err := s.getContainerNodes(cid)
nodes, _, err := s.getContainerNodes(cid)
if err != nil {
return fmt.Errorf("can't get container nodes: %w", err)
}