From 589cebcec25ab0001d2ec889b6c3f4064501e7e0 Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Fri, 19 Jan 2024 13:55:53 +0200 Subject: [PATCH] config: pass tower manager pointer in to PopulateDependencies In this commit, we let the explicit wtclient.Manager struct be passed in to PopulateDependencies instead of the tower client interface. We need to do this since we do allow the tower client interface to be nil if the client is not active. So to avoid the golang gotcha where the interface value will be seen as not nil even though the underlying value is nil, we pass in the explicit pointer instead. --- subrpcserver_config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subrpcserver_config.go b/subrpcserver_config.go index 360d7fa31..b4b004152 100644 --- a/subrpcserver_config.go +++ b/subrpcserver_config.go @@ -113,7 +113,7 @@ func (s *subRPCServerConfigs) PopulateDependencies(cfg *Config, chanStateDB *channeldb.ChannelStateDB, sweeper *sweep.UtxoSweeper, tower *watchtower.Standalone, - towerClientMgr wtclient.ClientManager, + towerClientMgr *wtclient.Manager, tcpResolver lncfg.TCPResolver, genInvoiceFeatures func() *lnwire.FeatureVector, genAmpInvoiceFeatures func() *lnwire.FeatureVector,