From 3cfb69aaac31507f00c3b06dbbab2561fe2b68af Mon Sep 17 00:00:00 2001 From: ziggie Date: Tue, 23 Jul 2024 11:36:41 +0200 Subject: [PATCH] lnd: change startup order of authGossiper. --- server.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/server.go b/server.go index 6321745c6e..c3260518b0 100644 --- a/server.go +++ b/server.go @@ -2026,12 +2026,6 @@ func (s *server) Start() error { return } - cleanup = cleanup.add(s.authGossiper.Stop) - if err := s.authGossiper.Start(); err != nil { - startErr = err - return - } - cleanup = cleanup.add(s.graphBuilder.Stop) if err := s.graphBuilder.Start(); err != nil { startErr = err @@ -2043,6 +2037,13 @@ func (s *server) Start() error { startErr = err return } + // The authGossiper depends on the chanRouter and therefore + // should be started after it. + cleanup = cleanup.add(s.authGossiper.Stop) + if err := s.authGossiper.Start(); err != nil { + startErr = err + return + } cleanup = cleanup.add(s.invoices.Stop) if err := s.invoices.Start(); err != nil {