watchtower: add sessionID index

In this commit, a new session-ID index is added to the tower client db
with the help of a migration. This index holds a mapping from a
db-assigned-ID (a uint64 encoded using BigSize encoding) to real session
ID (33 bytes). This mapping will help us save space in future when
persisting references to sessions.
This commit is contained in:
Elle Mouton committed 2023-03-20 10:46:52 +02:00
1 parent ae39cd9e91
commit b16df45076
7 files changed
+373 -7

No files matched your search

+2
View File
@@ -8,6 +8,7 @@ import (
"github.com/lightningnetwork/lnd/watchtower/wtdb/migration3"
"github.com/lightningnetwork/lnd/watchtower/wtdb/migration4"
"github.com/lightningnetwork/lnd/watchtower/wtdb/migration5"
"github.com/lightningnetwork/lnd/watchtower/wtdb/migration6"
)
// log is a logger that is initialized with no output filters. This
@@ -36,6 +37,7 @@ func UseLogger(logger btclog.Logger) {
migration3.UseLogger(logger)
migration4.UseLogger(logger)
migration5.UseLogger(logger)
migration6.UseLogger(logger)
}
// logClosure is used to provide a closure over expensive logging operations so