[#766] Fix stylecheck import linter error

Remove redundant imports

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-08-24 13:53:35 +03:00 committed by Alex Vanin
parent 53f031e98c
commit cadd94f08f
2 changed files with 9 additions and 11 deletions

View file

@ -8,7 +8,6 @@ import (
v2reputationgrpc "github.com/nspcc-dev/neofs-api-go/v2/reputation/grpc" 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-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/common"
"github.com/nspcc-dev/neofs-node/cmd/neofs-node/reputation/intermediate"
intermediatereputation "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" localreputation "github.com/nspcc-dev/neofs-node/cmd/neofs-node/reputation/local"
rtpwrapper "github.com/nspcc-dev/neofs-node/pkg/morph/client/reputation/wrapper" 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{}) consumerStorage := consumerstorage.New(consumerstorage.Prm{})
// storing received daughter(of current node) trusts as a manager // storing received daughter(of current node) trusts as a manager
daughterStorageWriterProvider := &intermediate.DaughterStorageWriterProvider{ daughterStorageWriterProvider := &intermediatereputation.DaughterStorageWriterProvider{
Log: c.log, Log: c.log,
Storage: daughterStorage, Storage: daughterStorage,
} }
consumerStorageWriterProvider := &intermediate.ConsumerStorageWriterProvider{ consumerStorageWriterProvider := &intermediatereputation.ConsumerStorageWriterProvider{
Log: c.log, Log: c.log,
Storage: consumerStorage, Storage: consumerStorage,
} }
@ -136,15 +135,15 @@ func initReputationService(c *cfg) {
}, },
IntermediateValueTarget: intermediateTrustRouter, IntermediateValueTarget: intermediateTrustRouter,
WorkerPool: c.cfgReputation.workerPool, WorkerPool: c.cfgReputation.workerPool,
FinalResultTarget: intermediate.NewFinalWriterProvider( FinalResultTarget: intermediatereputation.NewFinalWriterProvider(
intermediate.FinalWriterProviderPrm{ intermediatereputation.FinalWriterProviderPrm{
PrivatKey: &c.key.PrivateKey, PrivatKey: &c.key.PrivateKey,
PubKey: localKey, PubKey: localKey,
Client: wrap, Client: wrap,
}, },
intermediate.FinalWriterWithLogger(c.log), intermediatereputation.FinalWriterWithLogger(c.log),
), ),
DaughterTrustSource: &intermediate.DaughterTrustIteratorProvider{ DaughterTrustSource: &intermediatereputation.DaughterTrustIteratorProvider{
DaughterStorage: daughterStorage, DaughterStorage: daughterStorage,
ConsumerStorage: consumerStorage, ConsumerStorage: consumerStorage,
}, },
@ -154,7 +153,7 @@ func initReputationService(c *cfg) {
eigenTrustController := eigentrustctrl.New( eigenTrustController := eigentrustctrl.New(
eigentrustctrl.Prm{ eigentrustctrl.Prm{
DaughtersTrustCalculator: &intermediate.DaughtersTrustCalculator{ DaughtersTrustCalculator: &intermediatereputation.DaughtersTrustCalculator{
Calculator: eigenTrustCalculator, Calculator: eigenTrustCalculator,
}, },
IterationsProvider: c.cfgNetmap.wrapper, IterationsProvider: c.cfgNetmap.wrapper,

View file

@ -23,7 +23,6 @@ import (
"github.com/nspcc-dev/neofs-node/pkg/innerring/processors/settlement/common" "github.com/nspcc-dev/neofs-node/pkg/innerring/processors/settlement/common"
auditClient "github.com/nspcc-dev/neofs-node/pkg/morph/client/audit/wrapper" auditClient "github.com/nspcc-dev/neofs-node/pkg/morph/client/audit/wrapper"
balanceClient "github.com/nspcc-dev/neofs-node/pkg/morph/client/balance/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" containerClient "github.com/nspcc-dev/neofs-node/pkg/morph/client/container/wrapper"
"github.com/nspcc-dev/neofs-node/pkg/util/logger" "github.com/nspcc-dev/neofs-node/pkg/util/logger"
"go.uber.org/zap" "go.uber.org/zap"
@ -236,13 +235,13 @@ func (b basicIncomeSettlementDeps) BasicRate() (uint64, error) {
return b.BasicIncomeRate() 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) estimationIDs, err := b.cnrClient.ListLoadEstimationsByEpoch(epoch)
if err != nil { if err != nil {
return nil, err return nil, err
} }
result := make([]*wrapper.Estimations, 0, len(estimationIDs)) result := make([]*containerClient.Estimations, 0, len(estimationIDs))
for i := range estimationIDs { for i := range estimationIDs {
estimation, err := b.cnrClient.GetUsedSpaceEstimations(estimationIDs[i]) estimation, err := b.cnrClient.GetUsedSpaceEstimations(estimationIDs[i])