watchtower: migrate channel summaries

In this commit a migration of the tower client db is done. The migration
creates a new top-level cChanDetailsBkt bucket and for each channel
found in the old cChanSummaryBkt bucket, it creates a new sub-bucket. In
the subbucket, the ClientChanSummary is then stored under the
cChannelSummary key. The reason for this migration is that it will be
useful in future when we want to store more easily accessible data under
a specific client ID.
This commit is contained in:
Elle Mouton committed 2023-01-11 13:46:55 +02:00
1 parent 4ab8c57eae
commit d03047f313
7 files changed
+283 -19

No files matched your search

+2
View File
@@ -4,6 +4,7 @@ import (
"github.com/btcsuite/btclog"
"github.com/lightningnetwork/lnd/build"
"github.com/lightningnetwork/lnd/watchtower/wtdb/migration1"
"github.com/lightningnetwork/lnd/watchtower/wtdb/migration2"
)
// log is a logger that is initialized with no output filters. This
@@ -28,6 +29,7 @@ func DisableLog() {
func UseLogger(logger btclog.Logger) {
log = logger
migration1.UseLogger(logger)
migration2.UseLogger(logger)
}
// logClosure is used to provide a closure over expensive logging operations so