sqldb+lncfg: consolidate SQLite default constants

Move the SQLite default constants (max connections, busy timeout) to
sqldb/config.go as the single source of truth and export them. Remove
the duplicate definitions from lncfg/db.go and reference the sqldb
constants instead.
This commit is contained in:
ziggie committed 2026-02-11 13:15:56 +01:00
1 parent d87d93b114
commit 325f83c179
2 files changed
+9 -12

No files matched your search

+2 -5
View File
@@ -40,9 +40,6 @@ const (
DefaultBatchCommitInterval = 500 * time.Millisecond
defaultPostgresMaxConnections = 50
defaultSqliteMaxConnections = 2
defaultSqliteBusyTimeout = 5 * time.Second
// NSChannelDB is the namespace name that we use for the combined graph
// and channel state DB.
@@ -126,8 +123,8 @@ func DefaultDB() *DB {
QueryConfig: *sqldb.DefaultPostgresConfig(),
},
Sqlite: &sqldb.SqliteConfig{
MaxConnections: defaultSqliteMaxConnections,
BusyTimeout: defaultSqliteBusyTimeout,
MaxConnections: sqldb.DefaultSqliteMaxConns,
BusyTimeout: sqldb.DefaultSqliteBusyTimeout,
QueryConfig: *sqldb.DefaultSQLiteConfig(),
},
UseNativeSQL: false,