lnd+lncfg: move normalizeNetwork to lncfg

This commit is contained in:
Eugene
2020-10-06 11:17:14 -07:00
committed by eugene
parent 4d238cfa2f
commit 46ef212de4
4 changed files with 17 additions and 18 deletions

5
lnd.go
View File

@@ -547,7 +547,7 @@ func Main(cfg *Config, lisCfg ListenerCfg, shutdownChan <-chan struct{}) error {
towerDBDir := filepath.Join(
cfg.Watchtower.TowerDir,
cfg.registeredChains.PrimaryChain().String(),
normalizeNetwork(cfg.ActiveNetParams.Name),
lncfg.NormalizeNetwork(cfg.ActiveNetParams.Name),
)
towerDB, err := wtdb.OpenTowerDB(towerDBDir)
@@ -1344,8 +1344,7 @@ func initNeutrinoBackend(cfg *Config, chainDir string) (*neutrino.ChainService,
// database if needed. We append the normalized network name here to
// match the behavior of btcwallet.
dbPath := filepath.Join(
chainDir,
normalizeNetwork(cfg.ActiveNetParams.Name),
chainDir, lncfg.NormalizeNetwork(cfg.ActiveNetParams.Name),
)
// Ensure that the neutrino db path exists.