mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-07 14:00:08 +02:00
multi: move AddTower to Tower Client Manager
In this commit we move the AddTower method from the Client interface to the TowerClientManager interface. The wtclientrpc is updated to call the `AddTower` method of the Manager instead of calling the `AddTower` method of each individual client. The TowerClient now is also only concerned with adding a new tower (or new tower address) to its in-memory state; the tower Manager will handle adding the tower to the DB.
This commit is contained in:
@ -115,6 +115,7 @@ func (s *subRPCServerConfigs) PopulateDependencies(cfg *Config,
|
||||
tower *watchtower.Standalone,
|
||||
towerClient wtclient.Client,
|
||||
anchorTowerClient wtclient.Client,
|
||||
towerClientMgr wtclient.TowerClientManager,
|
||||
tcpResolver lncfg.TCPResolver,
|
||||
genInvoiceFeatures func() *lnwire.FeatureVector,
|
||||
genAmpInvoiceFeatures func() *lnwire.FeatureVector,
|
||||
@ -297,6 +298,9 @@ func (s *subRPCServerConfigs) PopulateDependencies(cfg *Config,
|
||||
subCfgValue.FieldByName("AnchorClient").Set(
|
||||
reflect.ValueOf(anchorTowerClient),
|
||||
)
|
||||
subCfgValue.FieldByName("ClientMgr").Set(
|
||||
reflect.ValueOf(towerClientMgr),
|
||||
)
|
||||
}
|
||||
subCfgValue.FieldByName("Resolver").Set(
|
||||
reflect.ValueOf(tcpResolver),
|
||||
|
Reference in New Issue
Block a user