forked from TrueCloudLab/frostfs-node
[#125] ir: Set extra wallets on SIGHUP
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
0624820909
commit
6f47c75e43
7 changed files with 61 additions and 36 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/config"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/processors/alphabet"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/processors/governance"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/processors/netmap"
|
||||
timerEvent "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/timers"
|
||||
|
@ -73,7 +74,8 @@ type (
|
|||
withoutMainNet bool
|
||||
|
||||
// runtime processors
|
||||
netmapProcessor *netmap.Processor
|
||||
netmapProcessor *netmap.Processor
|
||||
alphabetProcessor *alphabet.Processor
|
||||
|
||||
workers []func(context.Context)
|
||||
|
||||
|
@ -383,13 +385,12 @@ func New(ctx context.Context, log *logger.Logger, cfg *viper.Viper, errChan chan
|
|||
return nil, err
|
||||
}
|
||||
|
||||
var processors *serverProcessors
|
||||
processors, err = server.initProcessors(cfg, morphClients)
|
||||
err = server.initProcessors(cfg, morphClients)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
server.initTimers(cfg, processors, morphClients)
|
||||
server.initTimers(cfg, morphClients)
|
||||
|
||||
err = server.initGRPCServer(cfg)
|
||||
if err != nil {
|
||||
|
@ -589,3 +590,12 @@ func (s *Server) newEpochTickHandlers() []newEpochHandler {
|
|||
|
||||
return newEpochHandlers
|
||||
}
|
||||
|
||||
func (s *Server) SetExtraWallets(cfg *viper.Viper) error {
|
||||
parsedWallets, err := parseWalletAddressesFromStrings(cfg.GetStringSlice("emit.extra_wallets"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
s.alphabetProcessor.SetParsedWallets(parsedWallets)
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue