multi: warn user if they try to switch db types

Warn a user if they attempt to initialise a new db type (sqlite or
postgres) if an old bbolt db file is found.
This commit is contained in:
Oliver Gugger
2023-01-13 16:55:02 +02:00
committed by Elle Mouton
parent c89e5b68b0
commit fe5254510e
2 changed files with 35 additions and 2 deletions

View File

@ -830,7 +830,7 @@ func (d *DefaultDatabaseBuilder) BuildDatabase(
cfg.Watchtower.TowerDir,
cfg.registeredChains.PrimaryChain().String(),
lncfg.NormalizeNetwork(cfg.ActiveNetParams.Name),
), cfg.WtClient.Active, cfg.Watchtower.Active,
), cfg.WtClient.Active, cfg.Watchtower.Active, d.logger,
)
if err != nil {
return nil, nil, fmt.Errorf("unable to obtain database "+