From bd9b085ed6c95822935e60c5a6a9417644beae56 Mon Sep 17 00:00:00 2001 From: Tom Kirkpatrick Date: Tue, 6 Feb 2024 15:34:59 +0000 Subject: [PATCH] collectors: do not start htlc monitor when htlc monitoring is disabled --- collectors/prometheus.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/collectors/prometheus.go b/collectors/prometheus.go index 1e97236..0c24590 100644 --- a/collectors/prometheus.go +++ b/collectors/prometheus.go @@ -150,8 +150,10 @@ func (p *PrometheusExporter) Start() error { // Start the htlc monitor goroutine. This will subscribe to htlcs and // update all of our routing-related metrics. - if err := p.htlcMonitor.start(); err != nil { - return err + if !p.monitoringCfg.DisableHtlc { + if err := p.htlcMonitor.start(); err != nil { + return err + } } // Finally, we'll launch the HTTP server that Prometheus will use to