[#1607] pilorama: Enable tree service explicitly

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-07-18 13:16:23 +03:00 committed by fyrchik
parent d62723f038
commit a4adb79db7
6 changed files with 72 additions and 16 deletions

View file

@ -3,10 +3,16 @@ package main
import (
"context"
"github.com/nspcc-dev/neofs-node/cmd/neofs-node/config"
"github.com/nspcc-dev/neofs-node/pkg/services/tree"
)
func initTreeService(c *cfg) {
if !config.BoolSafe(c.appCfg.Sub("tree"), "enabled") {
c.log.Info("tree service is not enabled, skip initialization")
return
}
c.treeService = tree.New(
tree.WithContainerSource(c.cfgObject.cnrSource),
tree.WithNetmapSource(c.netMapSource),