mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
lnd: start the BestBlockTracker during server startup
This commit is contained in:
parent
7c403b439c
commit
74b30a71cb
10
server.go
10
server.go
@ -1901,6 +1901,12 @@ func (s *server) Start() error {
|
|||||||
}
|
}
|
||||||
cleanup = cleanup.add(s.cc.ChainNotifier.Stop)
|
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 {
|
if err := s.channelNotifier.Start(); err != nil {
|
||||||
startErr = err
|
startErr = err
|
||||||
return
|
return
|
||||||
@ -2282,6 +2288,10 @@ func (s *server) Stop() error {
|
|||||||
if err := s.cc.ChainNotifier.Stop(); err != nil {
|
if err := s.cc.ChainNotifier.Stop(); err != nil {
|
||||||
srvrLog.Warnf("Unable to stop ChainNotifier: %v", err)
|
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.chanEventStore.Stop()
|
||||||
s.missionControl.StopStoreTicker()
|
s.missionControl.StopStoreTicker()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user