mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 14:40:51 +02:00
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:
@@ -91,6 +91,10 @@ type DatabaseBackends struct {
|
||||
// ChanStateDB points to a possibly networked replicated backend that
|
||||
// contains the critical channel state related data.
|
||||
ChanStateDB kvdb.Backend
|
||||
|
||||
// HeightHintDB points to a possibly networked replicated backend that
|
||||
// contains the chain height hint related data.
|
||||
HeightHintDB kvdb.Backend
|
||||
}
|
||||
|
||||
// GetBackends returns a set of kvdb.Backends as set in the DB config.
|
||||
@@ -124,8 +128,9 @@ func (db *DB) GetBackends(ctx context.Context, dbPath string) (
|
||||
}
|
||||
|
||||
return &DatabaseBackends{
|
||||
GraphDB: localDB,
|
||||
ChanStateDB: remoteDB,
|
||||
GraphDB: localDB,
|
||||
ChanStateDB: remoteDB,
|
||||
HeightHintDB: localDB,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user