invoices+rpc: add missing channel graph to the AddInvoiceConfig

The Graph which is referenced later in the AddInvoice call graph is
unset when adding a hodl invoice. This resulted in a crash.
This commit is contained in:
Andras Banki-Horvath
2021-02-03 11:02:29 +01:00
parent 814b81bd25
commit dde5750160
4 changed files with 18 additions and 9 deletions

View File

@@ -621,9 +621,9 @@ func newRPCServer(cfg *Config, s *server, macService *macaroons.Service,
err = subServerCgs.PopulateDependencies(
cfg, s.cc, cfg.networkDir, macService, atpl, invoiceRegistry,
s.htlcSwitch, cfg.ActiveNetParams.Params, s.chanRouter,
routerBackend, s.nodeSigner, s.remoteChanDB, s.sweeper, tower,
s.towerClient, s.anchorTowerClient, cfg.net.ResolveTCPAddr,
genInvoiceFeatures, rpcsLog,
routerBackend, s.nodeSigner, s.localChanDB, s.remoteChanDB,
s.sweeper, tower, s.towerClient, s.anchorTowerClient,
cfg.net.ResolveTCPAddr, genInvoiceFeatures, rpcsLog,
)
if err != nil {
return nil, err