mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-29 07:00:55 +02:00
multi: update walletdb package
This commit is contained in:
@@ -73,6 +73,10 @@ type BoltBackendConfig struct {
|
||||
// DBTimeout specifies the timeout value to use when opening the wallet
|
||||
// database.
|
||||
DBTimeout time.Duration
|
||||
|
||||
// ReadOnly specifies if the database should be opened in read-only
|
||||
// mode.
|
||||
ReadOnly bool
|
||||
}
|
||||
|
||||
// GetBoltBackend opens (or creates if doesn't exits) a bbolt backed database
|
||||
@@ -90,7 +94,7 @@ func GetBoltBackend(cfg *BoltBackendConfig) (Backend, error) {
|
||||
|
||||
return Create(
|
||||
BoltBackendName, dbFilePath,
|
||||
cfg.NoFreelistSync, cfg.DBTimeout,
|
||||
cfg.NoFreelistSync, cfg.DBTimeout, cfg.ReadOnly,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -104,7 +108,7 @@ func GetBoltBackend(cfg *BoltBackendConfig) (Backend, error) {
|
||||
|
||||
return Open(
|
||||
BoltBackendName, dbFilePath,
|
||||
cfg.NoFreelistSync, cfg.DBTimeout,
|
||||
cfg.NoFreelistSync, cfg.DBTimeout, cfg.ReadOnly,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -294,6 +298,7 @@ func GetTestBackend(path, name string) (Backend, func(), error) {
|
||||
DBFileName: name,
|
||||
NoFreelistSync: true,
|
||||
DBTimeout: DefaultDBTimeout,
|
||||
ReadOnly: false,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
|
@@ -35,6 +35,10 @@ type BoltBackendConfig struct {
|
||||
// DBTimeout specifies the timeout value to use when opening the wallet
|
||||
// database.
|
||||
DBTimeout time.Duration
|
||||
|
||||
// ReadOnly specifies if the database should be opened in read-only
|
||||
// mode.
|
||||
ReadOnly bool
|
||||
}
|
||||
|
||||
// GetBoltBackend opens (or creates if doesn't exits) a bbolt backed database
|
||||
|
@@ -28,6 +28,7 @@ func (b *boltFixture) NewBackend() walletdb.DB {
|
||||
DBFileName: "test.db",
|
||||
NoFreelistSync: true,
|
||||
DBTimeout: DefaultDBTimeout,
|
||||
ReadOnly: false,
|
||||
})
|
||||
require.NoError(b.t, err)
|
||||
|
||||
|
@@ -2,7 +2,7 @@ module github.com/lightningnetwork/lnd/kvdb
|
||||
|
||||
require (
|
||||
github.com/btcsuite/btclog/v2 v2.0.0-20241017175713-3428138b75c7
|
||||
github.com/btcsuite/btcwallet/walletdb v1.4.4
|
||||
github.com/btcsuite/btcwallet/walletdb v1.5.1
|
||||
github.com/davecgh/go-spew v1.1.1
|
||||
github.com/fergusstrange/embedded-postgres v1.25.0
|
||||
github.com/google/btree v1.0.1
|
||||
|
@@ -42,8 +42,8 @@ github.com/btcsuite/btclog v0.0.0-20241003133417-09c4e92e319c/go.mod h1:w7xnGOhw
|
||||
github.com/btcsuite/btclog/v2 v2.0.0-20241017175713-3428138b75c7 h1:3Ct3zN3VCEKVm5nceWBBEKczc+jvTfVyOEG71ob2Yuc=
|
||||
github.com/btcsuite/btclog/v2 v2.0.0-20241017175713-3428138b75c7/go.mod h1:XItGUfVOxotJL8kkuk2Hj3EVow5KCugXl3wWfQ6K0AE=
|
||||
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
|
||||
github.com/btcsuite/btcwallet/walletdb v1.4.4 h1:BDel6iT/ltYSIYKs0YbjwnEDi7xR3yzABIsQxN2F1L8=
|
||||
github.com/btcsuite/btcwallet/walletdb v1.4.4/go.mod h1:jk/hvpLFINF0C1kfTn0bfx2GbnFT+Nvnj6eblZALfjs=
|
||||
github.com/btcsuite/btcwallet/walletdb v1.5.1 h1:HgMhDNCrtEFPC+8q0ei5DQ5U9Tl4RCspA22DEKXlopI=
|
||||
github.com/btcsuite/btcwallet/walletdb v1.5.1/go.mod h1:jk/hvpLFINF0C1kfTn0bfx2GbnFT+Nvnj6eblZALfjs=
|
||||
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg=
|
||||
github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY=
|
||||
github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I=
|
||||
|
Reference in New Issue
Block a user