From cadd94f08f24eb9c76ccb508e0ea11129ab4cdf9 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Tue, 24 Aug 2021 13:53:35 +0300 Subject: [PATCH] [#766] Fix stylecheck import linter error Remove redundant imports Signed-off-by: Alex Vanin --- cmd/neofs-node/reputation.go | 15 +++++++-------- pkg/innerring/settlement.go | 5 ++--- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/cmd/neofs-node/reputation.go b/cmd/neofs-node/reputation.go index 18f7d6072..8973cbd9c 100644 --- a/cmd/neofs-node/reputation.go +++ b/cmd/neofs-node/reputation.go @@ -8,7 +8,6 @@ import ( v2reputationgrpc "github.com/nspcc-dev/neofs-api-go/v2/reputation/grpc" "github.com/nspcc-dev/neofs-api-go/v2/session" "github.com/nspcc-dev/neofs-node/cmd/neofs-node/reputation/common" - "github.com/nspcc-dev/neofs-node/cmd/neofs-node/reputation/intermediate" intermediatereputation "github.com/nspcc-dev/neofs-node/cmd/neofs-node/reputation/intermediate" localreputation "github.com/nspcc-dev/neofs-node/cmd/neofs-node/reputation/local" rtpwrapper "github.com/nspcc-dev/neofs-node/pkg/morph/client/reputation/wrapper" @@ -50,12 +49,12 @@ func initReputationService(c *cfg) { consumerStorage := consumerstorage.New(consumerstorage.Prm{}) // storing received daughter(of current node) trusts as a manager - daughterStorageWriterProvider := &intermediate.DaughterStorageWriterProvider{ + daughterStorageWriterProvider := &intermediatereputation.DaughterStorageWriterProvider{ Log: c.log, Storage: daughterStorage, } - consumerStorageWriterProvider := &intermediate.ConsumerStorageWriterProvider{ + consumerStorageWriterProvider := &intermediatereputation.ConsumerStorageWriterProvider{ Log: c.log, Storage: consumerStorage, } @@ -136,15 +135,15 @@ func initReputationService(c *cfg) { }, IntermediateValueTarget: intermediateTrustRouter, WorkerPool: c.cfgReputation.workerPool, - FinalResultTarget: intermediate.NewFinalWriterProvider( - intermediate.FinalWriterProviderPrm{ + FinalResultTarget: intermediatereputation.NewFinalWriterProvider( + intermediatereputation.FinalWriterProviderPrm{ PrivatKey: &c.key.PrivateKey, PubKey: localKey, Client: wrap, }, - intermediate.FinalWriterWithLogger(c.log), + intermediatereputation.FinalWriterWithLogger(c.log), ), - DaughterTrustSource: &intermediate.DaughterTrustIteratorProvider{ + DaughterTrustSource: &intermediatereputation.DaughterTrustIteratorProvider{ DaughterStorage: daughterStorage, ConsumerStorage: consumerStorage, }, @@ -154,7 +153,7 @@ func initReputationService(c *cfg) { eigenTrustController := eigentrustctrl.New( eigentrustctrl.Prm{ - DaughtersTrustCalculator: &intermediate.DaughtersTrustCalculator{ + DaughtersTrustCalculator: &intermediatereputation.DaughtersTrustCalculator{ Calculator: eigenTrustCalculator, }, IterationsProvider: c.cfgNetmap.wrapper, diff --git a/pkg/innerring/settlement.go b/pkg/innerring/settlement.go index f3203e58c..23dd7e2d6 100644 --- a/pkg/innerring/settlement.go +++ b/pkg/innerring/settlement.go @@ -23,7 +23,6 @@ import ( "github.com/nspcc-dev/neofs-node/pkg/innerring/processors/settlement/common" auditClient "github.com/nspcc-dev/neofs-node/pkg/morph/client/audit/wrapper" balanceClient "github.com/nspcc-dev/neofs-node/pkg/morph/client/balance/wrapper" - "github.com/nspcc-dev/neofs-node/pkg/morph/client/container/wrapper" containerClient "github.com/nspcc-dev/neofs-node/pkg/morph/client/container/wrapper" "github.com/nspcc-dev/neofs-node/pkg/util/logger" "go.uber.org/zap" @@ -236,13 +235,13 @@ func (b basicIncomeSettlementDeps) BasicRate() (uint64, error) { return b.BasicIncomeRate() } -func (b basicIncomeSettlementDeps) Estimations(epoch uint64) ([]*wrapper.Estimations, error) { +func (b basicIncomeSettlementDeps) Estimations(epoch uint64) ([]*containerClient.Estimations, error) { estimationIDs, err := b.cnrClient.ListLoadEstimationsByEpoch(epoch) if err != nil { return nil, err } - result := make([]*wrapper.Estimations, 0, len(estimationIDs)) + result := make([]*containerClient.Estimations, 0, len(estimationIDs)) for i := range estimationIDs { estimation, err := b.cnrClient.GetUsedSpaceEstimations(estimationIDs[i])