Skip to content

Commit

Permalink
allow null chanDB
Browse files Browse the repository at this point in the history
  • Loading branch information
JssDWt committed Jul 24, 2023
1 parent ae386e7 commit ed20a67
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion config_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -938,12 +938,16 @@ func (d *DefaultDatabaseBuilder) BuildDatabase(
}

startOpenTime := time.Now()
var chanDBBackend walletdb.DB
if d.chanDB != nil {
chanDBBackend = d.chanDB.Backend
}
databaseBackends, err := cfg.DB.GetBackends(
ctx, cfg.graphDatabaseDir(), cfg.networkDir, filepath.Join(
cfg.Watchtower.TowerDir,
cfg.registeredChains.PrimaryChain().String(),
lncfg.NormalizeNetwork(cfg.ActiveNetParams.Name),
), cfg.WtClient.Active, cfg.Watchtower.Active, d.logger, d.chanDB.Backend,
), cfg.WtClient.Active, cfg.Watchtower.Active, d.logger, chanDBBackend,
)
if err != nil {
return nil, nil, fmt.Errorf("unable to obtain database "+
Expand Down

0 comments on commit ed20a67

Please sign in to comment.