mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 01:43:16 +01:00
server: start htlcSwitch before chainArb
This commit is contained in:
parent
1aaa1d89bb
commit
72548ea463
@ -36,6 +36,10 @@
|
||||
could result in an "invoice too large" error when creating invoices. Hints
|
||||
are now properly limited to our maximum of 20.
|
||||
|
||||
* [Fixed an edge case where the lnd might be stuck at starting due to channel
|
||||
arbitrator relying on htlcswitch to be started
|
||||
first](https://github.com/lightningnetwork/lnd/pull/6214).
|
||||
|
||||
## Misc
|
||||
|
||||
* [An example systemd service file](https://github.com/lightningnetwork/lnd/pull/6033)
|
||||
|
15
server.go
15
server.go
@ -1777,6 +1777,15 @@ func (s *server) Start() error {
|
||||
}
|
||||
cleanup = cleanup.add(s.fundingMgr.Stop)
|
||||
|
||||
// htlcSwitch must be started before chainArb since the latter
|
||||
// relies on htlcSwitch to deliver resolution message upon
|
||||
// start.
|
||||
if err := s.htlcSwitch.Start(); err != nil {
|
||||
startErr = err
|
||||
return
|
||||
}
|
||||
cleanup = cleanup.add(s.htlcSwitch.Stop)
|
||||
|
||||
if err := s.chainArb.Start(); err != nil {
|
||||
startErr = err
|
||||
return
|
||||
@ -1807,12 +1816,6 @@ func (s *server) Start() error {
|
||||
}
|
||||
cleanup = cleanup.add(s.sphinx.Stop)
|
||||
|
||||
if err := s.htlcSwitch.Start(); err != nil {
|
||||
startErr = err
|
||||
return
|
||||
}
|
||||
cleanup = cleanup.add(s.htlcSwitch.Stop)
|
||||
|
||||
if err := s.chanStatusMgr.Start(); err != nil {
|
||||
startErr = err
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user