server: launch new invoiceRegistry goroutines on start up

This commit is contained in:
Olaoluwa Osuntokun 2018-04-24 21:08:46 -07:00
parent 892a413be3
commit 2c08a22ed3
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

View File

@ -753,6 +753,10 @@ func (s *server) Start() error {
} }
s.connMgr.Start() s.connMgr.Start()
if err := s.invoices.Start(); err != nil {
return err
}
// With all the relevant sub-systems started, we'll now attempt to // With all the relevant sub-systems started, we'll now attempt to
// establish persistent connections to our direct channel collaborators // establish persistent connections to our direct channel collaborators
// within the network. // within the network.
@ -809,6 +813,7 @@ func (s *server) Stop() error {
s.cc.chainView.Stop() s.cc.chainView.Stop()
s.connMgr.Stop() s.connMgr.Stop()
s.cc.feeEstimator.Stop() s.cc.feeEstimator.Stop()
s.invoices.Stop()
// Disconnect from each active peers to ensure that // Disconnect from each active peers to ensure that
// peerTerminationWatchers signal completion to each peer. // peerTerminationWatchers signal completion to each peer.