mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-29 07:00:55 +02:00
channeldb: properly handle ErrMetaNotFound error within syncVersions
This commit is contained in:
@@ -307,7 +307,11 @@ func (d *DB) FetchAllChannels() ([]*OpenChannel, error) {
|
||||
func (d *DB) syncVersions(versions []version) error {
|
||||
meta, err := d.FetchMeta(nil)
|
||||
if err != nil {
|
||||
return err
|
||||
if err == ErrMetaNotFound {
|
||||
meta = &Meta{}
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// If the current database version matches the latest version number,
|
||||
|
Reference in New Issue
Block a user