From e843e7f0905a9512b4c7d2886ee980f1dc6e1ff1 Mon Sep 17 00:00:00 2001
From: Pavel Karpy
Date: Tue, 28 Mar 2023 18:52:23 +0300
Subject: [PATCH] [#184] ir: Delete unused config reader param
Not used since notary environments do endless and non-configurable
deposits.
Signed-off-by: Pavel Karpy
---
pkg/innerring/innerring.go | 5 ++---
pkg/innerring/notary.go | 3 +--
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/pkg/innerring/innerring.go b/pkg/innerring/innerring.go
index 200a20179..1c2d797ef 100644
--- a/pkg/innerring/innerring.go
+++ b/pkg/innerring/innerring.go
@@ -13,7 +13,7 @@ import (
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/processors/audit"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/processors/balance"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/processors/container"
- frostfs "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/processors/frostfs"
+ "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/processors/frostfs"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/processors/governance"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/processors/netmap"
nodevalidator "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/processors/netmap/nodevalidation"
@@ -411,8 +411,7 @@ func New(ctx context.Context, log *logger.Logger, cfg *viper.Viper, errChan chan
}
}
- server.mainNotaryConfig, server.sideNotaryConfig = parseNotaryConfigs(
- cfg,
+ server.mainNotaryConfig, server.sideNotaryConfig = notaryConfigs(
server.morphClient.ProbeNotary(),
!server.withoutMainNet && server.mainnetClient.ProbeNotary(), // if mainnet disabled then notary flag must be disabled too
)
diff --git a/pkg/innerring/notary.go b/pkg/innerring/notary.go
index 617d7bbe0..50353b574 100644
--- a/pkg/innerring/notary.go
+++ b/pkg/innerring/notary.go
@@ -7,7 +7,6 @@ import (
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/event"
"github.com/nspcc-dev/neo-go/pkg/util"
- "github.com/spf13/viper"
"go.uber.org/zap"
)
@@ -115,7 +114,7 @@ func awaitNotaryDepositInClient(ctx context.Context, cli *client.Client, txHash
return errDepositTimeout
}
-func parseNotaryConfigs(cfg *viper.Viper, withSideNotary, withMainNotary bool) (main, side *notaryConfig) {
+func notaryConfigs(withSideNotary, withMainNotary bool) (main, side *notaryConfig) {
main = new(notaryConfig)
side = new(notaryConfig)