mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-29 15:11:09 +02:00
bbolt sync-freelist ignored
This commit is contained in:
13
lncfg/db.go
13
lncfg/db.go
@@ -65,6 +65,7 @@ func DefaultDB() *DB {
|
||||
Backend: BoltBackend,
|
||||
BatchCommitInterval: DefaultBatchCommitInterval,
|
||||
Bolt: &kvdb.BoltConfig{
|
||||
NoFreelistSync: true,
|
||||
AutoCompactMinAge: kvdb.DefaultBoltAutoCompactMinAge,
|
||||
DBTimeout: kvdb.DefaultDBTimeout,
|
||||
},
|
||||
@@ -364,7 +365,7 @@ func (db *DB) GetBackends(ctx context.Context, chanDBPath,
|
||||
DBPath: chanDBPath,
|
||||
DBFileName: channelDBName,
|
||||
DBTimeout: db.Bolt.DBTimeout,
|
||||
NoFreelistSync: !db.Bolt.SyncFreelist,
|
||||
NoFreelistSync: db.Bolt.NoFreelistSync,
|
||||
AutoCompact: db.Bolt.AutoCompact,
|
||||
AutoCompactMinAge: db.Bolt.AutoCompactMinAge,
|
||||
})
|
||||
@@ -377,7 +378,7 @@ func (db *DB) GetBackends(ctx context.Context, chanDBPath,
|
||||
DBPath: walletDBPath,
|
||||
DBFileName: macaroonDBName,
|
||||
DBTimeout: db.Bolt.DBTimeout,
|
||||
NoFreelistSync: !db.Bolt.SyncFreelist,
|
||||
NoFreelistSync: db.Bolt.NoFreelistSync,
|
||||
AutoCompact: db.Bolt.AutoCompact,
|
||||
AutoCompactMinAge: db.Bolt.AutoCompactMinAge,
|
||||
})
|
||||
@@ -390,7 +391,7 @@ func (db *DB) GetBackends(ctx context.Context, chanDBPath,
|
||||
DBPath: chanDBPath,
|
||||
DBFileName: decayedLogDbName,
|
||||
DBTimeout: db.Bolt.DBTimeout,
|
||||
NoFreelistSync: !db.Bolt.SyncFreelist,
|
||||
NoFreelistSync: db.Bolt.NoFreelistSync,
|
||||
AutoCompact: db.Bolt.AutoCompact,
|
||||
AutoCompactMinAge: db.Bolt.AutoCompactMinAge,
|
||||
})
|
||||
@@ -408,7 +409,7 @@ func (db *DB) GetBackends(ctx context.Context, chanDBPath,
|
||||
DBPath: chanDBPath,
|
||||
DBFileName: towerClientDBName,
|
||||
DBTimeout: db.Bolt.DBTimeout,
|
||||
NoFreelistSync: !db.Bolt.SyncFreelist,
|
||||
NoFreelistSync: db.Bolt.NoFreelistSync,
|
||||
AutoCompact: db.Bolt.AutoCompact,
|
||||
AutoCompactMinAge: db.Bolt.AutoCompactMinAge,
|
||||
},
|
||||
@@ -429,7 +430,7 @@ func (db *DB) GetBackends(ctx context.Context, chanDBPath,
|
||||
DBPath: towerServerDBPath,
|
||||
DBFileName: towerServerDBName,
|
||||
DBTimeout: db.Bolt.DBTimeout,
|
||||
NoFreelistSync: !db.Bolt.SyncFreelist,
|
||||
NoFreelistSync: db.Bolt.NoFreelistSync,
|
||||
AutoCompact: db.Bolt.AutoCompact,
|
||||
AutoCompactMinAge: db.Bolt.AutoCompactMinAge,
|
||||
},
|
||||
@@ -456,7 +457,7 @@ func (db *DB) GetBackends(ctx context.Context, chanDBPath,
|
||||
// method so we don't need to add anything to our map (in fact
|
||||
// nothing is opened just yet).
|
||||
WalletDB: btcwallet.LoaderWithLocalWalletDB(
|
||||
walletDBPath, !db.Bolt.SyncFreelist, db.Bolt.DBTimeout,
|
||||
walletDBPath, db.Bolt.NoFreelistSync, db.Bolt.DBTimeout,
|
||||
),
|
||||
CloseFuncs: closeFuncs,
|
||||
}, nil
|
||||
|
Reference in New Issue
Block a user