Merge branch '0-19-2-branch-rc1-9653' into 0-19-2-branch-rc1

This commit is contained in:
Olaoluwa Osuntokun
2025-06-20 15:45:39 -07:00

View File

@@ -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() {})