diff --git a/config/config.go b/config/config.go index 6d0bc9de2..291ac82be 100644 --- a/config/config.go +++ b/config/config.go @@ -98,13 +98,16 @@ type ( // MonitorOptions is the configuration for blockchain monitoring MonitorOptions struct { - Enabled bool `json:"enabled" mapstructure:"enabled"` // true/false - CentrifugeServer string `json:"centrifuge_server" mapstructure:"centrifuge_server"` // The server url address - Token string `json:"token" mapstructure:"token"` // Token to connect to the server with - MonitorDays int `json:"monitor_days" mapstructure:"monitor_days"` // how many days in the past should we monitor an address (default: 7) - FalsePositiveRate float64 `json:"false_positive_rate" mapstructure:"false_positive_rate"` // how many false positives do we except (default: 0.01) - MaxNumberOfDestinations int `json:"max_number_of_destinations" mapstructure:"max_number_of_destinations"` // how many destinations can the filter hold (default: 100,000) - ProcessMempoolOnConnect bool `json:"process_mempool_on_connect" mapstructure:"process_mempool_on_connect"` // Whether to process all transactions in the mempool when connecting to centrifuge server + Enabled bool `json:"enabled" mapstructure:"enabled"` // true/false + CentrifugeServer string `json:"centrifuge_server" mapstructure:"centrifuge_server"` // The server url address + Token string `json:"token" mapstructure:"token"` // Token to connect to the server with + MonitorDays int `json:"monitor_days" mapstructure:"monitor_days"` // how many days in the past should we monitor an address (default: 7) + FalsePositiveRate float64 `json:"false_positive_rate" mapstructure:"false_positive_rate"` // how many false positives do we except (default: 0.01) + SaveTransactionDestinations bool `json:"save_transaction_destinations" mapstructure:"save_transaction_destinations"` // Whether to save destinations on monitored transactions + ProcessorType string `json:"processor_type" mapstructure:"processor_type"` // Type of processor to start monitor with. Default: bloom + LoadMonitoredDestinations bool `json:"load_monitored_destinations" mapstructure:"load_monitored_destinations" // Whehter to load monitored destinations` + MaxNumberOfDestinations int `json:"max_number_of_destinations" mapstructure:"max_number_of_destinations"` // how many destinations can the filter hold (default: 100,000) + ProcessMempoolOnConnect bool `json:"process_mempool_on_connect" mapstructure:"process_mempool_on_connect"` // Whether to process all transactions in the mempool when connecting to centrifuge server } // NewRelicConfig is the configuration for New Relic diff --git a/config/envs/development.json b/config/envs/development.json index f8fb064c6..4ba1ecf91 100644 --- a/config/envs/development.json +++ b/config/envs/development.json @@ -35,7 +35,9 @@ "enabled": true, "centrifuge_server": "ws://localhost:8000/websocket", "token": "", - "processMempoolOnConnect": true + "processMempoolOnConnect": true, + "load_monitored_destinations": false, + "save_destinations": true }, "new_relic": { "domain_name": "domain.com", diff --git a/config/services.go b/config/services.go index 9e9100769..403c30bd6 100644 --- a/config/services.go +++ b/config/services.go @@ -210,12 +210,14 @@ func (s *AppServices) loadBux(ctx context.Context, appConfig *AppConfig) (err er return } options = append(options, bux.WithMonitoring(ctx, &chainstate.MonitorOptions{ - CentrifugeServer: appConfig.Monitor.CentrifugeServer, - MonitorDays: appConfig.Monitor.MonitorDays, - Token: appConfig.Monitor.Token, - FalsePositiveRate: appConfig.Monitor.FalsePositiveRate, - MaxNumberOfDestinations: appConfig.Monitor.MaxNumberOfDestinations, - ProcessMempoolOnConnect: appConfig.Monitor.ProcessMempoolOnConnect, + CentrifugeServer: appConfig.Monitor.CentrifugeServer, + MonitorDays: appConfig.Monitor.MonitorDays, + Token: appConfig.Monitor.Token, + FalsePositiveRate: appConfig.Monitor.FalsePositiveRate, + MaxNumberOfDestinations: appConfig.Monitor.MaxNumberOfDestinations, + SaveTransactionDestinations: appConfig.Monitor.SaveTransactionDestinations, + LoadMonitoredDestinations: appConfig.Monitor.LoadMonitoredDestinations, + ProcessMempoolOnConnect: appConfig.Monitor.ProcessMempoolOnConnect, })) }