From 35bdb69b780add3e33ece1ae6d18597e1118b8e4 Mon Sep 17 00:00:00 2001 From: Dmitrii Stepanov Date: Fri, 1 Mar 2024 10:55:44 +0300 Subject: [PATCH] [#1015] morph: Resolve funlen linter Signed-off-by: Dmitrii Stepanov --- cmd/frostfs-node/morph.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd/frostfs-node/morph.go b/cmd/frostfs-node/morph.go index 23f323a2e..11563bf47 100644 --- a/cmd/frostfs-node/morph.go +++ b/cmd/frostfs-node/morph.go @@ -85,6 +85,12 @@ func initMorphComponents(ctx context.Context, c *cfg) { zap.Bool("sidechain_enabled", c.cfgMorph.notaryEnabled), ) + initNetmapSource(c) + + c.cfgMorph.inactivityTimeout = morphconfig.InactivityTimeout(c.appCfg) +} + +func initNetmapSource(c *cfg) { wrap, err := nmClient.NewFromMorph(c.cfgMorph.client, c.cfgNetmap.scriptHash, 0, nmClient.TryNotary()) fatalOnErr(err) @@ -105,9 +111,6 @@ func initMorphComponents(ctx context.Context, c *cfg) { // use RPC node as source of netmap (with caching) netmapSource = newCachedNetmapStorage(c.cfgNetmap.state, wrap) } - - c.cfgMorph.inactivityTimeout = morphconfig.InactivityTimeout(c.appCfg) - c.netMapSource = netmapSource c.cfgNetmap.wrapper = wrap }