mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-23 14:40:30 +01:00
channeldb: skip dry run mode for optional migrations
This commit is contained in:
parent
b391503ddf
commit
ac6e1a836c
1 changed files with 8 additions and 0 deletions
|
@ -1422,6 +1422,14 @@ func (d *DB) syncVersions(versions []mandatoryVersion) error {
|
||||||
//
|
//
|
||||||
// NOTE: only support the prune_revocation_log optional migration atm.
|
// NOTE: only support the prune_revocation_log optional migration atm.
|
||||||
func (d *DB) applyOptionalVersions(cfg OptionalMiragtionConfig) error {
|
func (d *DB) applyOptionalVersions(cfg OptionalMiragtionConfig) error {
|
||||||
|
// TODO(yy): need to design the db to support dry run for optional
|
||||||
|
// migrations.
|
||||||
|
if d.dryRun {
|
||||||
|
log.Info("Skipped optional migrations as dry run mode is not " +
|
||||||
|
"supported yet")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
om, err := d.fetchOptionalMeta()
|
om, err := d.fetchOptionalMeta()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err == ErrMetaNotFound {
|
if err == ErrMetaNotFound {
|
||||||
|
|
Loading…
Add table
Reference in a new issue