mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
accounts: keep the full *db.BaseDB pointer
This will make it possible in SQL unit tests to extract the BaseDB used for accounts and use it to init another Store backed by the same BaseDB.
This commit is contained in:
parent
b3bc6df4e4
commit
a82cda6ab4
1 changed files with 5 additions and 5 deletions
|
|
@ -67,8 +67,8 @@ type SQLStore struct {
|
|||
// in order to implement all its CRUD logic.
|
||||
db BatchedSQLQueries
|
||||
|
||||
// DB represents the underlying database connection.
|
||||
*sql.DB
|
||||
// BaseDB represents the underlying database connection.
|
||||
*db.BaseDB
|
||||
|
||||
clock clock.Clock
|
||||
}
|
||||
|
|
@ -83,9 +83,9 @@ func NewSQLStore(sqlDB *db.BaseDB, clock clock.Clock) *SQLStore {
|
|||
)
|
||||
|
||||
return &SQLStore{
|
||||
db: executor,
|
||||
DB: sqlDB.DB,
|
||||
clock: clock,
|
||||
db: executor,
|
||||
BaseDB: sqlDB,
|
||||
clock: clock,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue