From 74b30a71cba6462e7d816b9a21c891ce0554a410 Mon Sep 17 00:00:00 2001 From: Keagan McClelland Date: Wed, 12 Jul 2023 16:30:34 -0600 Subject: [PATCH] lnd: start the BestBlockTracker during server startup --- server.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server.go b/server.go index e09a6f062..0882fa23c 100644 --- a/server.go +++ b/server.go @@ -1901,6 +1901,12 @@ func (s *server) Start() error { } cleanup = cleanup.add(s.cc.ChainNotifier.Stop) + if err := s.cc.BestBlockTracker.Start(); err != nil { + startErr = err + return + } + cleanup = cleanup.add(s.cc.BestBlockTracker.Stop) + if err := s.channelNotifier.Start(); err != nil { startErr = err return @@ -2282,6 +2288,10 @@ func (s *server) Stop() error { if err := s.cc.ChainNotifier.Stop(); err != nil { srvrLog.Warnf("Unable to stop ChainNotifier: %v", err) } + if err := s.cc.BestBlockTracker.Stop(); err != nil { + srvrLog.Warnf("Unable to stop BestBlockTracker: %v", + err) + } s.chanEventStore.Stop() s.missionControl.StopStoreTicker()