forked from TrueCloudLab/frostfs-node
[#496] pkg/innerring: remove unused processor parameters
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
8a2b7f4501
commit
7cf0093012
5 changed files with 0 additions and 49 deletions
|
@ -460,10 +460,7 @@ func New(ctx context.Context, log *zap.Logger, cfg *viper.Viper) (*Server, error
|
||||||
Log: log,
|
Log: log,
|
||||||
NetmapClient: server.netmapClient,
|
NetmapClient: server.netmapClient,
|
||||||
ContainerClient: cnrClient,
|
ContainerClient: cnrClient,
|
||||||
AuditContract: server.contracts.audit,
|
|
||||||
MorphClient: server.morphClient,
|
|
||||||
IRList: server,
|
IRList: server,
|
||||||
FeeProvider: server.feeConfig,
|
|
||||||
ClientCache: clientCache,
|
ClientCache: clientCache,
|
||||||
Key: &server.key.PrivateKey,
|
Key: &server.key.PrivateKey,
|
||||||
RPCSearchTimeout: cfg.GetDuration("audit.timeout.search"),
|
RPCSearchTimeout: cfg.GetDuration("audit.timeout.search"),
|
||||||
|
@ -573,7 +570,6 @@ func New(ctx context.Context, log *zap.Logger, cfg *viper.Viper) (*Server, error
|
||||||
),
|
),
|
||||||
AlphabetSyncHandler: alphaSync,
|
AlphabetSyncHandler: alphaSync,
|
||||||
NodeValidator: locodeValidator,
|
NodeValidator: locodeValidator,
|
||||||
FeeProvider: server.feeConfig,
|
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -589,9 +585,7 @@ func New(ctx context.Context, log *zap.Logger, cfg *viper.Viper) (*Server, error
|
||||||
Log: log,
|
Log: log,
|
||||||
PoolSize: cfg.GetInt("workers.container"),
|
PoolSize: cfg.GetInt("workers.container"),
|
||||||
ContainerContract: server.contracts.container,
|
ContainerContract: server.contracts.container,
|
||||||
MorphClient: server.morphClient,
|
|
||||||
AlphabetState: server,
|
AlphabetState: server,
|
||||||
FeeProvider: server.feeConfig,
|
|
||||||
ContainerClient: cnrClient,
|
ContainerClient: cnrClient,
|
||||||
NeoFSIDClient: neofsIDClient,
|
NeoFSIDClient: neofsIDClient,
|
||||||
NetworkState: server.netmapClient,
|
NetworkState: server.netmapClient,
|
||||||
|
@ -637,7 +631,6 @@ func New(ctx context.Context, log *zap.Logger, cfg *viper.Viper) (*Server, error
|
||||||
EpochState: server,
|
EpochState: server,
|
||||||
AlphabetState: server,
|
AlphabetState: server,
|
||||||
Converter: &server.precision,
|
Converter: &server.precision,
|
||||||
FeeProvider: server.feeConfig,
|
|
||||||
MintEmitCacheSize: cfg.GetInt("emit.mint.cache_size"),
|
MintEmitCacheSize: cfg.GetInt("emit.mint.cache_size"),
|
||||||
MintEmitThreshold: cfg.GetUint64("emit.mint.threshold"),
|
MintEmitThreshold: cfg.GetUint64("emit.mint.threshold"),
|
||||||
MintEmitValue: fixedn.Fixed8(cfg.GetInt64("emit.mint.value")),
|
MintEmitValue: fixedn.Fixed8(cfg.GetInt64("emit.mint.value")),
|
||||||
|
|
|
@ -7,10 +7,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
|
||||||
SDKClient "github.com/nspcc-dev/neofs-api-go/pkg/client"
|
SDKClient "github.com/nspcc-dev/neofs-api-go/pkg/client"
|
||||||
"github.com/nspcc-dev/neofs-node/pkg/innerring/config"
|
|
||||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client"
|
|
||||||
wrapContainer "github.com/nspcc-dev/neofs-node/pkg/morph/client/container/wrapper"
|
wrapContainer "github.com/nspcc-dev/neofs-node/pkg/morph/client/container/wrapper"
|
||||||
wrapNetmap "github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap/wrapper"
|
wrapNetmap "github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap/wrapper"
|
||||||
"github.com/nspcc-dev/neofs-node/pkg/morph/event"
|
"github.com/nspcc-dev/neofs-node/pkg/morph/event"
|
||||||
|
@ -44,8 +41,6 @@ type (
|
||||||
Processor struct {
|
Processor struct {
|
||||||
log *zap.Logger
|
log *zap.Logger
|
||||||
pool *ants.Pool
|
pool *ants.Pool
|
||||||
auditContract util.Uint160
|
|
||||||
morphClient *client.Client
|
|
||||||
irList Indexer
|
irList Indexer
|
||||||
clientCache NeoFSClientCache
|
clientCache NeoFSClientCache
|
||||||
key *ecdsa.PrivateKey
|
key *ecdsa.PrivateKey
|
||||||
|
@ -64,10 +59,7 @@ type (
|
||||||
Log *zap.Logger
|
Log *zap.Logger
|
||||||
NetmapClient *wrapNetmap.Wrapper
|
NetmapClient *wrapNetmap.Wrapper
|
||||||
ContainerClient *wrapContainer.Wrapper
|
ContainerClient *wrapContainer.Wrapper
|
||||||
AuditContract util.Uint160
|
|
||||||
MorphClient *client.Client
|
|
||||||
IRList Indexer
|
IRList Indexer
|
||||||
FeeProvider *config.FeeConfig
|
|
||||||
ClientCache NeoFSClientCache
|
ClientCache NeoFSClientCache
|
||||||
RPCSearchTimeout time.Duration
|
RPCSearchTimeout time.Duration
|
||||||
TaskManager TaskManager
|
TaskManager TaskManager
|
||||||
|
@ -92,12 +84,8 @@ func New(p *Params) (*Processor, error) {
|
||||||
switch {
|
switch {
|
||||||
case p.Log == nil:
|
case p.Log == nil:
|
||||||
return nil, errors.New("ir/audit: logger is not set")
|
return nil, errors.New("ir/audit: logger is not set")
|
||||||
case p.MorphClient == nil:
|
|
||||||
return nil, errors.New("ir/audit: neo:morph client is not set")
|
|
||||||
case p.IRList == nil:
|
case p.IRList == nil:
|
||||||
return nil, errors.New("ir/audit: global state is not set")
|
return nil, errors.New("ir/audit: global state is not set")
|
||||||
case p.FeeProvider == nil:
|
|
||||||
return nil, errors.New("ir/audit: fee provider is not set")
|
|
||||||
case p.ClientCache == nil:
|
case p.ClientCache == nil:
|
||||||
return nil, errors.New("ir/audit: neofs RPC client cache is not set")
|
return nil, errors.New("ir/audit: neofs RPC client cache is not set")
|
||||||
case p.TaskManager == nil:
|
case p.TaskManager == nil:
|
||||||
|
@ -117,8 +105,6 @@ func New(p *Params) (*Processor, error) {
|
||||||
log: p.Log,
|
log: p.Log,
|
||||||
pool: pool,
|
pool: pool,
|
||||||
containerClient: p.ContainerClient,
|
containerClient: p.ContainerClient,
|
||||||
auditContract: p.AuditContract,
|
|
||||||
morphClient: p.MorphClient,
|
|
||||||
irList: p.IRList,
|
irList: p.IRList,
|
||||||
clientCache: p.ClientCache,
|
clientCache: p.ClientCache,
|
||||||
key: p.Key,
|
key: p.Key,
|
||||||
|
|
|
@ -5,8 +5,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||||
"github.com/nspcc-dev/neofs-node/pkg/innerring/config"
|
|
||||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client"
|
|
||||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client/container/wrapper"
|
"github.com/nspcc-dev/neofs-node/pkg/morph/client/container/wrapper"
|
||||||
neofsid "github.com/nspcc-dev/neofs-node/pkg/morph/client/neofsid/wrapper"
|
neofsid "github.com/nspcc-dev/neofs-node/pkg/morph/client/neofsid/wrapper"
|
||||||
"github.com/nspcc-dev/neofs-node/pkg/morph/event"
|
"github.com/nspcc-dev/neofs-node/pkg/morph/event"
|
||||||
|
@ -26,9 +24,7 @@ type (
|
||||||
log *zap.Logger
|
log *zap.Logger
|
||||||
pool *ants.Pool
|
pool *ants.Pool
|
||||||
containerContract util.Uint160
|
containerContract util.Uint160
|
||||||
morphClient *client.Client
|
|
||||||
alphabetState AlphabetState
|
alphabetState AlphabetState
|
||||||
feeProvider *config.FeeConfig
|
|
||||||
cnrClient *wrapper.Wrapper // notary must be enabled
|
cnrClient *wrapper.Wrapper // notary must be enabled
|
||||||
idClient *neofsid.ClientWrapper
|
idClient *neofsid.ClientWrapper
|
||||||
netState NetworkState
|
netState NetworkState
|
||||||
|
@ -39,9 +35,7 @@ type (
|
||||||
Log *zap.Logger
|
Log *zap.Logger
|
||||||
PoolSize int
|
PoolSize int
|
||||||
ContainerContract util.Uint160
|
ContainerContract util.Uint160
|
||||||
MorphClient *client.Client
|
|
||||||
AlphabetState AlphabetState
|
AlphabetState AlphabetState
|
||||||
FeeProvider *config.FeeConfig
|
|
||||||
ContainerClient *wrapper.Wrapper
|
ContainerClient *wrapper.Wrapper
|
||||||
NeoFSIDClient *neofsid.ClientWrapper
|
NeoFSIDClient *neofsid.ClientWrapper
|
||||||
NetworkState NetworkState
|
NetworkState NetworkState
|
||||||
|
@ -70,12 +64,8 @@ func New(p *Params) (*Processor, error) {
|
||||||
switch {
|
switch {
|
||||||
case p.Log == nil:
|
case p.Log == nil:
|
||||||
return nil, errors.New("ir/container: logger is not set")
|
return nil, errors.New("ir/container: logger is not set")
|
||||||
case p.MorphClient == nil:
|
|
||||||
return nil, errors.New("ir/container: neo:morph client is not set")
|
|
||||||
case p.AlphabetState == nil:
|
case p.AlphabetState == nil:
|
||||||
return nil, errors.New("ir/container: global state is not set")
|
return nil, errors.New("ir/container: global state is not set")
|
||||||
case p.FeeProvider == nil:
|
|
||||||
return nil, errors.New("ir/container: fee provider is not set")
|
|
||||||
case p.ContainerClient == nil:
|
case p.ContainerClient == nil:
|
||||||
return nil, errors.New("ir/container: Container client is not set")
|
return nil, errors.New("ir/container: Container client is not set")
|
||||||
case p.NeoFSIDClient == nil:
|
case p.NeoFSIDClient == nil:
|
||||||
|
@ -95,9 +85,7 @@ func New(p *Params) (*Processor, error) {
|
||||||
log: p.Log,
|
log: p.Log,
|
||||||
pool: pool,
|
pool: pool,
|
||||||
containerContract: p.ContainerContract,
|
containerContract: p.ContainerContract,
|
||||||
morphClient: p.MorphClient,
|
|
||||||
alphabetState: p.AlphabetState,
|
alphabetState: p.AlphabetState,
|
||||||
feeProvider: p.FeeProvider,
|
|
||||||
cnrClient: p.ContainerClient,
|
cnrClient: p.ContainerClient,
|
||||||
idClient: p.NeoFSIDClient,
|
idClient: p.NeoFSIDClient,
|
||||||
netState: p.NetworkState,
|
netState: p.NetworkState,
|
||||||
|
|
|
@ -8,7 +8,6 @@ import (
|
||||||
lru "github.com/hashicorp/golang-lru"
|
lru "github.com/hashicorp/golang-lru"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/encoding/fixedn"
|
"github.com/nspcc-dev/neo-go/pkg/encoding/fixedn"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||||
"github.com/nspcc-dev/neofs-node/pkg/innerring/config"
|
|
||||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client"
|
"github.com/nspcc-dev/neofs-node/pkg/morph/client"
|
||||||
balanceWrapper "github.com/nspcc-dev/neofs-node/pkg/morph/client/balance/wrapper"
|
balanceWrapper "github.com/nspcc-dev/neofs-node/pkg/morph/client/balance/wrapper"
|
||||||
neofsid "github.com/nspcc-dev/neofs-node/pkg/morph/client/neofsid/wrapper"
|
neofsid "github.com/nspcc-dev/neofs-node/pkg/morph/client/neofsid/wrapper"
|
||||||
|
@ -40,14 +39,12 @@ type (
|
||||||
log *zap.Logger
|
log *zap.Logger
|
||||||
pool *ants.Pool
|
pool *ants.Pool
|
||||||
neofsContract util.Uint160
|
neofsContract util.Uint160
|
||||||
neofsIDContract util.Uint160
|
|
||||||
balanceClient *balanceWrapper.Wrapper
|
balanceClient *balanceWrapper.Wrapper
|
||||||
netmapClient *nmWrapper.Wrapper
|
netmapClient *nmWrapper.Wrapper
|
||||||
morphClient *client.Client
|
morphClient *client.Client
|
||||||
epochState EpochState
|
epochState EpochState
|
||||||
alphabetState AlphabetState
|
alphabetState AlphabetState
|
||||||
converter PrecisionConverter
|
converter PrecisionConverter
|
||||||
feeProvider *config.FeeConfig
|
|
||||||
mintEmitLock *sync.Mutex
|
mintEmitLock *sync.Mutex
|
||||||
mintEmitCache *lru.Cache
|
mintEmitCache *lru.Cache
|
||||||
mintEmitThreshold uint64
|
mintEmitThreshold uint64
|
||||||
|
@ -69,7 +66,6 @@ type (
|
||||||
EpochState EpochState
|
EpochState EpochState
|
||||||
AlphabetState AlphabetState
|
AlphabetState AlphabetState
|
||||||
Converter PrecisionConverter
|
Converter PrecisionConverter
|
||||||
FeeProvider *config.FeeConfig
|
|
||||||
MintEmitCacheSize int
|
MintEmitCacheSize int
|
||||||
MintEmitThreshold uint64 // in epochs
|
MintEmitThreshold uint64 // in epochs
|
||||||
MintEmitValue fixedn.Fixed8
|
MintEmitValue fixedn.Fixed8
|
||||||
|
@ -99,8 +95,6 @@ func New(p *Params) (*Processor, error) {
|
||||||
return nil, errors.New("ir/neofs: global state is not set")
|
return nil, errors.New("ir/neofs: global state is not set")
|
||||||
case p.Converter == nil:
|
case p.Converter == nil:
|
||||||
return nil, errors.New("ir/neofs: balance precision converter is not set")
|
return nil, errors.New("ir/neofs: balance precision converter is not set")
|
||||||
case p.FeeProvider == nil:
|
|
||||||
return nil, errors.New("ir/neofs: fee provider is not set")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
p.Log.Debug("neofs worker pool", zap.Int("size", p.PoolSize))
|
p.Log.Debug("neofs worker pool", zap.Int("size", p.PoolSize))
|
||||||
|
@ -125,7 +119,6 @@ func New(p *Params) (*Processor, error) {
|
||||||
epochState: p.EpochState,
|
epochState: p.EpochState,
|
||||||
alphabetState: p.AlphabetState,
|
alphabetState: p.AlphabetState,
|
||||||
converter: p.Converter,
|
converter: p.Converter,
|
||||||
feeProvider: p.FeeProvider,
|
|
||||||
mintEmitLock: new(sync.Mutex),
|
mintEmitLock: new(sync.Mutex),
|
||||||
mintEmitCache: lruCache,
|
mintEmitCache: lruCache,
|
||||||
mintEmitThreshold: p.MintEmitThreshold,
|
mintEmitThreshold: p.MintEmitThreshold,
|
||||||
|
|
|
@ -6,7 +6,6 @@ import (
|
||||||
|
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||||
"github.com/nspcc-dev/neofs-api-go/pkg/netmap"
|
"github.com/nspcc-dev/neofs-api-go/pkg/netmap"
|
||||||
"github.com/nspcc-dev/neofs-node/pkg/innerring/config"
|
|
||||||
container "github.com/nspcc-dev/neofs-node/pkg/morph/client/container/wrapper"
|
container "github.com/nspcc-dev/neofs-node/pkg/morph/client/container/wrapper"
|
||||||
nmWrapper "github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap/wrapper"
|
nmWrapper "github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap/wrapper"
|
||||||
"github.com/nspcc-dev/neofs-node/pkg/morph/event"
|
"github.com/nspcc-dev/neofs-node/pkg/morph/event"
|
||||||
|
@ -67,8 +66,6 @@ type (
|
||||||
handleAlphabetSync event.Handler
|
handleAlphabetSync event.Handler
|
||||||
|
|
||||||
nodeValidator NodeValidator
|
nodeValidator NodeValidator
|
||||||
|
|
||||||
feeProvider *config.FeeConfig
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Params of the processor constructor.
|
// Params of the processor constructor.
|
||||||
|
@ -90,8 +87,6 @@ type (
|
||||||
AlphabetSyncHandler event.Handler
|
AlphabetSyncHandler event.Handler
|
||||||
|
|
||||||
NodeValidator NodeValidator
|
NodeValidator NodeValidator
|
||||||
|
|
||||||
FeeProvider *config.FeeConfig
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -122,8 +117,6 @@ func New(p *Params) (*Processor, error) {
|
||||||
return nil, errors.New("ir/netmap: container contract wrapper is not set")
|
return nil, errors.New("ir/netmap: container contract wrapper is not set")
|
||||||
case p.NodeValidator == nil:
|
case p.NodeValidator == nil:
|
||||||
return nil, errors.New("ir/netmap: node validator is not set")
|
return nil, errors.New("ir/netmap: node validator is not set")
|
||||||
case p.FeeProvider == nil:
|
|
||||||
return nil, errors.New("ir/netmap: fee provider is not set")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
p.Log.Debug("netmap worker pool", zap.Int("size", p.PoolSize))
|
p.Log.Debug("netmap worker pool", zap.Int("size", p.PoolSize))
|
||||||
|
@ -150,8 +143,6 @@ func New(p *Params) (*Processor, error) {
|
||||||
handleAlphabetSync: p.AlphabetSyncHandler,
|
handleAlphabetSync: p.AlphabetSyncHandler,
|
||||||
|
|
||||||
nodeValidator: p.NodeValidator,
|
nodeValidator: p.NodeValidator,
|
||||||
|
|
||||||
feeProvider: p.FeeProvider,
|
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue