From ad14e12f9461a1fbe7e68b4d4545f8d5f9368470 Mon Sep 17 00:00:00 2001 From: Siggi Date: Tue, 5 Apr 2022 17:54:46 +0200 Subject: [PATCH] Added load mempool on connect config for monitor --- config/config.go | 1 + config/services.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/config.go b/config/config.go index dae990b30..98d5edefe 100644 --- a/config/config.go +++ b/config/config.go @@ -103,6 +103,7 @@ type ( 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 } // NewRelicConfig is the configuration for New Relic diff --git a/config/services.go b/config/services.go index 46e1b7ab4..c1dad4a11 100644 --- a/config/services.go +++ b/config/services.go @@ -7,10 +7,9 @@ import ( "strings" "time" - "github.com/BuxOrg/bux/chainstate" - "github.com/BuxOrg/bux" "github.com/BuxOrg/bux/cachestore" + "github.com/BuxOrg/bux/chainstate" "github.com/BuxOrg/bux/datastore" "github.com/BuxOrg/bux/taskmanager" "github.com/BuxOrg/bux/utils" @@ -215,6 +214,7 @@ func (s *AppServices) loadBux(ctx context.Context, appConfig *AppConfig) (err er MonitorDays: appConfig.Monitor.MonitorDays, FalsePositiveRate: appConfig.Monitor.FalsePositiveRate, MaxNumberOfDestinations: appConfig.Monitor.MaxNumberOfDestinations, + ProcessMempoolOnConnect: appConfig.Monitor.ProcessMempoolOnConnect, })) }