From ac6e1a836c5c971b82de48c6ff773d58ab4835e0 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Tue, 12 Jul 2022 20:39:49 +0800 Subject: [PATCH] channeldb: skip dry run mode for optional migrations --- channeldb/db.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/channeldb/db.go b/channeldb/db.go index 3906fe73f..c30e6bdee 100644 --- a/channeldb/db.go +++ b/channeldb/db.go @@ -1422,6 +1422,14 @@ func (d *DB) syncVersions(versions []mandatoryVersion) error { // // NOTE: only support the prune_revocation_log optional migration atm. 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() if err != nil { if err == ErrMetaNotFound {