multi: migrate towers to use RangeIndex for AckedUpdates

In this commit, a migration is done that takes all the AckedUpdates of
all sessions and stores them in the RangeIndex pattern instead and
deletes the session's old AckedUpdates bucket. All the logic in the code
is also updates in order to write and read from this new structure.
This commit is contained in:
Elle Mouton
2022-12-23 11:14:01 +02:00
parent 50ad10666c
commit c3a2368f46
9 changed files with 524 additions and 120 deletions

View File

@@ -4,6 +4,8 @@ import (
"github.com/btcsuite/btclog"
"github.com/lightningnetwork/lnd/build"
"github.com/lightningnetwork/lnd/watchtower/lookout"
"github.com/lightningnetwork/lnd/watchtower/wtclient"
"github.com/lightningnetwork/lnd/watchtower/wtdb"
"github.com/lightningnetwork/lnd/watchtower/wtserver"
)
@@ -30,4 +32,6 @@ func UseLogger(logger btclog.Logger) {
log = logger
lookout.UseLogger(logger)
wtserver.UseLogger(logger)
wtclient.UseLogger(logger)
wtdb.UseLogger(logger)
}