[#132] Use netmap cleaner in inner ring server

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-10-29 19:09:45 +03:00 committed by Alex Vanin
parent 94957dd38c
commit 976ba06300
2 changed files with 12 additions and 7 deletions

View file

@ -83,4 +83,7 @@ func defaultConfiguration(cfg *viper.Viper) {
cfg.SetDefault("workers.neofs", "10")
cfg.SetDefault("workers.container", "10")
cfg.SetDefault("workers.alphabet", "10")
cfg.SetDefault("netmap_cleaner.enabled", false)
cfg.SetDefault("netmap_cleaner.threshold", 3)
}

View file

@ -173,13 +173,15 @@ func New(ctx context.Context, log *zap.Logger, cfg *viper.Viper) (*Server, error
// create netmap processor
netmapProcessor, err := netmap.New(&netmap.Params{
Log: log,
PoolSize: cfg.GetInt("workers.netmap"),
NetmapContract: server.contracts.netmap,
EpochTimer: server.localTimers,
MorphClient: server.morphClient,
EpochState: server,
ActiveState: server,
Log: log,
PoolSize: cfg.GetInt("workers.netmap"),
NetmapContract: server.contracts.netmap,
EpochTimer: server.localTimers,
MorphClient: server.morphClient,
EpochState: server,
ActiveState: server,
CleanupEnabled: cfg.GetBool("netmap_cleaner.enabled"),
CleanupThreshold: cfg.GetUint64("netmap_cleaner.threshold"),
})
if err != nil {
return nil, err