migration30: add migration to convert old revocation logs

This commit adds the migration that's used to convert the old revocation
logs into the new format. The migration is fault-tolerant, meaning the
process can be interrupted and the migration will pick up what's left
when running again. We also cap how many records to be processed in each
db transaction to prevent OOM.
This commit is contained in:
yyforyongyu committed 2022-07-12 21:01:08 +08:00
1 parent 2a06145137
commit 61bff6086c
2 files changed
+572

No files matched your search

+2
View File
@@ -8,6 +8,7 @@ import (
"github.com/lightningnetwork/lnd/channeldb/migration13"
"github.com/lightningnetwork/lnd/channeldb/migration16"
"github.com/lightningnetwork/lnd/channeldb/migration24"
"github.com/lightningnetwork/lnd/channeldb/migration30"
"github.com/lightningnetwork/lnd/channeldb/migration_01_to_11"
"github.com/lightningnetwork/lnd/kvdb"
)
@@ -38,5 +39,6 @@ func UseLogger(logger btclog.Logger) {
migration13.UseLogger(logger)
migration16.UseLogger(logger)
migration24.UseLogger(logger)
migration30.UseLogger(logger)
kvdb.UseLogger(logger)
}