multi: use kvdb.Backend for height hint DB

In order to separate our databases more clearly, we refactor the height
hint cache DB to use a kvdb backend instead of the channel DB instance
directly.
This commit is contained in:
Oliver Gugger
2021-08-03 09:57:27 +02:00
parent 9138c8abac
commit c4917ae7fc
4 changed files with 26 additions and 14 deletions

View File

@@ -28,6 +28,7 @@ import (
"github.com/lightningnetwork/lnd/htlcswitch"
"github.com/lightningnetwork/lnd/input"
"github.com/lightningnetwork/lnd/keychain"
"github.com/lightningnetwork/lnd/kvdb"
"github.com/lightningnetwork/lnd/lncfg"
"github.com/lightningnetwork/lnd/lnwallet"
"github.com/lightningnetwork/lnd/lnwallet/btcwallet"
@@ -70,7 +71,7 @@ type Config struct {
// HeightHintDB is a pointer to the database that stores the height
// hints.
HeightHintDB *channeldb.DB
HeightHintDB kvdb.Backend
// ChanStateDB is a pointer to the database that stores the channel
// state.