Skip to content

Commit

Permalink
Merge pull request #65 from BuxOrg/siggi/monitor-block-headers-import
Browse files Browse the repository at this point in the history
Monitor block headers import
  • Loading branch information
mergify[bot] authored May 3, 2022
2 parents 5aa404a + 97550be commit dbbbc80
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 19 deletions.
15 changes: 7 additions & 8 deletions config/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,22 +221,21 @@ func (s *AppServices) loadBux(ctx context.Context, appConfig *AppConfig, testMod
options = append(options, bux.WithNotifications(appConfig.Notifications.WebhookEndpoint))
}

// Load the monitor
if appConfig.Monitor != nil && appConfig.Monitor.Enabled {
if appConfig.Monitor.BuxAgentURL == "" {
return errors.New("BuxAgentURL is required for monitoring")
err = errors.New("CentrifugeServer is required for monitoring to work")
return
}
options = append(options, bux.WithMonitoring(ctx, &chainstate.MonitorOptions{
AuthToken: appConfig.Monitor.AuthToken,
BuxAgentURL: appConfig.Monitor.BuxAgentURL,
Debug: appConfig.Monitor.Debug,
BuxAgentURL: appConfig.Monitor.BuxAgentURL,
MonitorDays: appConfig.Monitor.MonitorDays,
AuthToken: appConfig.Monitor.AuthToken,
FalsePositiveRate: appConfig.Monitor.FalsePositiveRate,
LoadMonitoredDestinations: appConfig.Monitor.LoadMonitoredDestinations,
MaxNumberOfDestinations: appConfig.Monitor.MaxNumberOfDestinations,
MonitorDays: appConfig.Monitor.MonitorDays,
ProcessMempoolOnConnect: appConfig.Monitor.ProcessMempoolOnConnect,
ProcessorType: appConfig.Monitor.ProcessorType,
SaveTransactionDestinations: appConfig.Monitor.SaveTransactionDestinations,
LoadMonitoredDestinations: appConfig.Monitor.LoadMonitoredDestinations,
ProcessMempoolOnConnect: appConfig.Monitor.ProcessMempoolOnConnect,
}))
}

Expand Down
4 changes: 2 additions & 2 deletions go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 4 additions & 9 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dbbbc80

Please sign in to comment.