[#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 <leonard@nspcc.ru>
support/v0.27
Leonard Lyubich 2021-09-29 12:27:04 +03:00 committed by Alex Vanin
parent 50c4c5116d
commit 287683c590
2 changed files with 0 additions and 13 deletions

View File

@ -111,8 +111,6 @@ type cfg struct {
cfgReputation cfgReputation
mainChainClient *client.Client
clientCache *cache.ClientCache
persistate *state.PersistentStorage

View File

@ -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