watchtower/wtdb: add new towerID-to-sessionID index

This commit adds a new towerID-to-sessionID index to the wtclient DB.
The commit also contains the necessary migration required in order to
build the index for an existing client.
This index will greatly improve the lookup of sessions for a given tower
ID.
This commit is contained in:
Elle Mouton
2022-10-04 15:49:17 +02:00
parent c60ecaccbf
commit 354a3b16bd
7 changed files with 620 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
package migration1
import (
"github.com/btcsuite/btclog"
)
// log is a logger that is initialized as disabled. This means the package will
// not perform any logging by default until a logger is set.
var log = btclog.Disabled
// UseLogger uses a specified Logger to output package logging info.
func UseLogger(logger btclog.Logger) {
log = logger
}