From b3225db5e1aa5ca01f858c73ea28d73d6eebdbd1 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 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/server.go b/server.go index 4560465e6c..02d92a36d6 100644 --- a/server.go +++ b/server.go @@ -2026,8 +2026,8 @@ func (s *server) Start() error { return } - cleanup = cleanup.add(s.authGossiper.Stop) - if err := s.authGossiper.Start(); err != nil { + cleanup = cleanup.add(s.chanRouter.Stop) + if err := s.chanRouter.Start(); err != nil { startErr = err return } @@ -2043,6 +2043,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 {