watchtower: add channelID index
In this commit, a new channel-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 channel ID (32 bytes). This mapping will help us save space in future when persisting references to channels.
This commit is contained in:
8 files changed
+380
-3
No files matched your search
@@ -5,6 +5,7 @@ import (
|
||||
"github.com/lightningnetwork/lnd/build"
|
||||
"github.com/lightningnetwork/lnd/watchtower/wtdb/migration1"
|
||||
"github.com/lightningnetwork/lnd/watchtower/wtdb/migration2"
|
||||
"github.com/lightningnetwork/lnd/watchtower/wtdb/migration3"
|
||||
)
|
||||
|
||||
// log is a logger that is initialized with no output filters. This
|
||||
@@ -30,6 +31,7 @@ func UseLogger(logger btclog.Logger) {
|
||||
log = logger
|
||||
migration1.UseLogger(logger)
|
||||
migration2.UseLogger(logger)
|
||||
migration3.UseLogger(logger)
|
||||
}
|
||||
|
||||
// logClosure is used to provide a closure over expensive logging operations so
|
||||
|
||||
Reference in new issue
Block a user