diff --git a/cmd/neofs-node/attributes.go b/cmd/neofs-node/attributes.go index 9cef09df4..8fa0475b0 100644 --- a/cmd/neofs-node/attributes.go +++ b/cmd/neofs-node/attributes.go @@ -17,6 +17,10 @@ const ( ) func parseAttributes(c *config.Config) []*netmap.NodeAttribute { + if nodeconfig.Relay(c) { + return nil + } + stringAttributes := nodeconfig.Attributes(c) attrs, err := attributes.ParseV2Attributes(stringAttributes, nil) diff --git a/cmd/neofs-node/config.go b/cmd/neofs-node/config.go index 5ba45cf86..de7618f39 100644 --- a/cmd/neofs-node/config.go +++ b/cmd/neofs-node/config.go @@ -237,7 +237,12 @@ func initCfg(path string) *cfg { log, err := logger.NewLogger(logPrm) fatalOnErr(err) - netAddr := nodeconfig.BootstrapAddresses(appCfg) + var netAddr network.AddressGroup + + relayOnly := nodeconfig.Relay(appCfg) + if !relayOnly { + netAddr = nodeconfig.BootstrapAddresses(appCfg) + } maxChunkSize := uint64(maxMsgSize) * 3 / 4 // 25% to meta, 75% to payload maxAddrAmount := uint64(maxChunkSize) / addressSize // each address is about 72 bytes @@ -256,8 +261,6 @@ func initCfg(path string) *cfg { reputationWorkerPool, err := ants.NewPool(notificationHandlerPoolSize) fatalOnErr(err) - relayOnly := nodeconfig.Relay(appCfg) - c := &cfg{ ctx: context.Background(), appCfg: appCfg,