[#867] governance: Add option to disable governance sync

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-09-30 11:46:37 +03:00 committed by Alex Vanin
parent 4661f65975
commit f2a61451b7
2 changed files with 3 additions and 1 deletions

View file

@ -120,4 +120,6 @@ func defaultConfiguration(cfg *viper.Viper) {
cfg.SetDefault("control.authorized_keys", []string{}) cfg.SetDefault("control.authorized_keys", []string{})
cfg.SetDefault("control.grpc.endpoint", "") cfg.SetDefault("control.grpc.endpoint", "")
cfg.SetDefault("governance.disable", false)
} }

View file

@ -603,7 +603,7 @@ func New(ctx context.Context, log *zap.Logger, cfg *viper.Viper) (*Server, error
var alphaSync event.Handler var alphaSync event.Handler
if server.withoutMainNet { if server.withoutMainNet || cfg.GetBool("governance.disable") {
alphaSync = func(event.Event) { alphaSync = func(event.Event) {
log.Debug("alphabet keys sync is disabled") log.Debug("alphabet keys sync is disabled")
} }