mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 22:25:24 +01:00
lnd: add sync logic in lnd main
This commit is contained in:
parent
c53ea091dd
commit
25167361d2
1 changed files with 6 additions and 0 deletions
6
lnd.go
6
lnd.go
|
@ -67,6 +67,12 @@ func lndMain() error {
|
|||
}
|
||||
defer chanDB.Close()
|
||||
|
||||
// Synchronize the version of database and apply migration if needed.
|
||||
if err := chanDB.SyncVersions(channeldb.DBVersions); err != nil {
|
||||
fmt.Println("unable to sync versions: ", err)
|
||||
return err
|
||||
}
|
||||
|
||||
// Next load btcd's TLS cert for the RPC connection. If a raw cert was
|
||||
// specified in the config, then we'll se that directly. Otherwise, we
|
||||
// attempt to read the cert from the path specified in the config.
|
||||
|
|
Loading…
Add table
Reference in a new issue