From 287683c590aeb2bd821b9348856059b774ab6554 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Wed, 29 Sep 2021 12:27:04 +0300 Subject: [PATCH] [#863] node: Do not open main chain client connection In current implementation storage node doesn't use main chain client. Signed-off-by: Leonard Lyubich --- cmd/neofs-node/config.go | 2 -- cmd/neofs-node/morph.go | 11 ----------- 2 files changed, 13 deletions(-) diff --git a/cmd/neofs-node/config.go b/cmd/neofs-node/config.go index d407f0dd0..d8c14fde6 100644 --- a/cmd/neofs-node/config.go +++ b/cmd/neofs-node/config.go @@ -111,8 +111,6 @@ type cfg struct { cfgReputation cfgReputation - mainChainClient *client.Client - clientCache *cache.ClientCache persistate *state.PersistentStorage diff --git a/cmd/neofs-node/morph.go b/cmd/neofs-node/morph.go index 94fe28f5a..2fce060ff 100644 --- a/cmd/neofs-node/morph.go +++ b/cmd/neofs-node/morph.go @@ -8,7 +8,6 @@ import ( "github.com/nspcc-dev/neo-go/pkg/core/block" "github.com/nspcc-dev/neo-go/pkg/util" - mainchainconfig "github.com/nspcc-dev/neofs-node/cmd/neofs-node/config/mainchain" morphconfig "github.com/nspcc-dev/neofs-node/cmd/neofs-node/config/morph" "github.com/nspcc-dev/neofs-node/pkg/core/netmap" "github.com/nspcc-dev/neofs-node/pkg/morph/client" @@ -65,16 +64,6 @@ func initMorphComponents(c *cfg) { fatalOnErr(err) } - // replace to a separate initialing block during refactoring - // since current function initializes sidechain components - fn(mainchainconfig.RPCEndpoint(c.appCfg), mainchainconfig.DialTimeout(c.appCfg), func(cli *client.Client) { - c.mainChainClient = cli - - c.log.Debug("notary support", - zap.Bool("mainchain_enabled", cli.ProbeNotary()), - ) - }) - fn(morphconfig.RPCEndpoint(c.appCfg), morphconfig.DialTimeout(c.appCfg), func(cli *client.Client) { c.cfgMorph.client = cli