staticaddr: remove dead code across managers

Remove unused errChan fields from the loopin, openchannel, and withdraw
managers. These channels were declared and initialized but never read
from or written to.

Remove the unused activeLoopIns map from the loopin manager. The map
was only written to but never read, making it dead code.

Remove the stale withdraw.Store interface whose method signatures no
longer match the concrete SqlStore API used by the manager.

Remove unused config fields from openchannel.Config (Server,
AddressManager, ChainNotifier, Signer) and deposit.ManagerConfig
(AddressClient, SwapClient, ChainParams) along with their daemon
wiring. Also remove the now-orphaned openchannel.AddressManager
interface.

Remove the unused GetStaticAddress and Close methods from
address.SqlStore and the GetStaticAddress method from the address.Store
interface, as the codebase only uses GetAllStaticAddresses.
This commit is contained in:
Slyghtning 2026-03-05 09:59:55 +01:00
parent f80aee4dae
commit 0b295123e7
No known key found for this signature in database
GPG key ID: F82D456EA023C9BF
10 changed files with 2 additions and 112 deletions

View file

@ -610,12 +610,9 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
// Static address deposit manager setup.
depositStore := deposit.NewSqlStore(baseDb)
depoCfg := &deposit.ManagerConfig{
AddressClient: staticAddressClient,
AddressManager: staticAddressManager,
SwapClient: swapClient,
Store: depositStore,
WalletKit: d.lnd.WalletKit,
ChainParams: d.lnd.ChainParams,
ChainNotifier: d.lnd.ChainNotifier,
Signer: d.lnd.Signer,
}
@ -646,14 +643,10 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
// Static address deposit open channel manager setup.
openChannelCfg := &openchannel.Config{
Server: staticAddressClient,
AddressManager: staticAddressManager,
DepositManager: depositManager,
WithdrawalManager: withdrawalManager,
WalletKit: d.lnd.WalletKit,
ChainParams: d.lnd.ChainParams,
ChainNotifier: d.lnd.ChainNotifier,
Signer: d.lnd.Signer,
LightningClient: d.lnd.Client,
}
openChannelManager = openchannel.NewManager(openChannelCfg)