From 50e86f88fe37e578381372bb0a46bce43aa7ba90 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Thu, 14 May 2020 14:33:01 +0200 Subject: [PATCH] rpcserver+subrpcserver: don't use global cfg --- rpcserver.go | 2 +- subrpcserver_config.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpcserver.go b/rpcserver.go index a5e0933b..520899ef 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -587,7 +587,7 @@ func newRPCServer(cfg *Config, s *server, macService *macaroons.Service, // the dependencies they need are properly populated within each sub // server configuration struct. err = subServerCgs.PopulateDependencies( - s.cc, cfg.networkDir, macService, atpl, invoiceRegistry, + cfg, s.cc, cfg.networkDir, macService, atpl, invoiceRegistry, s.htlcSwitch, activeNetParams.Params, s.chanRouter, routerBackend, s.nodeSigner, s.chanDB, s.sweeper, tower, s.towerClient, cfg.net.ResolveTCPAddr, genInvoiceFeatures, diff --git a/subrpcserver_config.go b/subrpcserver_config.go index af76d40a..0e98a928 100644 --- a/subrpcserver_config.go +++ b/subrpcserver_config.go @@ -80,7 +80,7 @@ type subRPCServerConfigs struct { // // NOTE: This MUST be called before any callers are permitted to execute the // FetchConfig method. -func (s *subRPCServerConfigs) PopulateDependencies(cc *chainControl, +func (s *subRPCServerConfigs) PopulateDependencies(cfg *Config, cc *chainControl, networkDir string, macService *macaroons.Service, atpl *autopilot.Manager, invoiceRegistry *invoices.InvoiceRegistry,