rpcserver+subrpcserver: don't use global cfg

This commit is contained in:
Oliver Gugger 2020-05-14 14:33:01 +02:00
parent 7c1304b31c
commit 50e86f88fe
No known key found for this signature in database
GPG Key ID: 8E4256593F177720
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -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,