mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 23:53:41 +02:00
Merge branch '0-19-2-branch-rc1-9653' into 0-19-2-branch-rc1
This commit is contained in:
@@ -479,6 +479,12 @@ func initChannelDB(db kvdb.Backend) error {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, tlb := range dbTopLevelBuckets {
|
||||
if _, err := tx.CreateTopLevelBucket(tlb); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
meta := &Meta{}
|
||||
// Check if DB is already initialized.
|
||||
err := FetchMeta(meta, tx)
|
||||
@@ -486,12 +492,6 @@ func initChannelDB(db kvdb.Backend) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
for _, tlb := range dbTopLevelBuckets {
|
||||
if _, err := tx.CreateTopLevelBucket(tlb); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
meta.DbVersionNumber = getLatestDBVersion(dbVersions)
|
||||
return putMeta(meta, tx)
|
||||
}, func() {})
|
||||
|
Reference in New Issue
Block a user