Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion btcwallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func rpcClientConnectLoop(legacyRPCServer *legacyrpc.Server, loader *wallet.Load
netDir := networkDir(cfg.AppDataDir.Value, activeNet.Params)
spvdb, err = walletdb.Create(
"bdb", filepath.Join(netDir, "neutrino.db"),
true, cfg.DBTimeout,
true, cfg.DBTimeout, false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some future PRs - we may create a walletdb config struct so it's easier to understand what these params mean

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

def, not sure if it is possible tho, because the parameters are different for the other dbs ?

)
if err != nil {
log.Errorf("Unable to create Neutrino DB: %s", err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/dropwtxmgr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func mainInt() int {
fmt.Println("Enter yes or no.")
}

db, err := walletdb.Open("bdb", opts.DbPath, true, opts.Timeout)
db, err := walletdb.Open("bdb", opts.DbPath, true, opts.Timeout, false)
if err != nil {
fmt.Println("Failed to open database:", err)
return 1
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ require (
github.com/btcsuite/btcwallet/wallet/txauthor v1.3.5
github.com/btcsuite/btcwallet/wallet/txrules v1.2.2
github.com/btcsuite/btcwallet/wallet/txsizes v1.2.5
github.com/btcsuite/btcwallet/walletdb v1.4.4
github.com/btcsuite/btcwallet/wtxmgr v1.5.4
github.com/btcsuite/btcwallet/walletdb v1.5.1
github.com/btcsuite/btcwallet/wtxmgr v1.5.5
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792
github.com/davecgh/go-spew v1.1.1
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0
Expand Down
10 changes: 6 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ github.com/btcsuite/btcwallet/wallet/txrules v1.2.2 h1:YEO+Lx1ZJJAtdRrjuhXjWrYsm
github.com/btcsuite/btcwallet/wallet/txrules v1.2.2/go.mod h1:4v+grppsDpVn91SJv+mZT7B8hEV4nSmpREM4I8Uohws=
github.com/btcsuite/btcwallet/wallet/txsizes v1.2.5 h1:93o5Xz9dYepBP4RMFUc9RGIFXwqP2volSWRkYJFrNtI=
github.com/btcsuite/btcwallet/wallet/txsizes v1.2.5/go.mod h1:lQ+e9HxZ85QP7r3kdxItkiMSloSLg1PEGis5o5CXUQw=
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/wtxmgr v1.5.4 h1:hJjHy1h/dJwSfD9uDsCwcH21D1iOrus6OrI5gR9E/O0=
github.com/btcsuite/btcwallet/wtxmgr v1.5.4/go.mod h1:lAv0b1Vj9Ig5U8QFm0yiJ9WqPl8yGO/6l7JxdHY1PKE=
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/btcwallet/wtxmgr v1.5.5 h1:VA/rHzAjiNuySPcKgdX3uAywbVczZlG5OZeSU7jYoZo=
github.com/btcsuite/btcwallet/wtxmgr v1.5.5/go.mod h1:lzVbDkk/jRao2ib5kge46aLZW1yFc8RFNycdYpnsmZA=
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw=
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=
Expand Down Expand Up @@ -131,6 +131,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc=
github.com/ziggie1984/btcwallet/wtxmgr v1.5.1-0.20250409134448-0a7b1137338f h1:iDexQIPkv+0lIHlFBdEjJQ7FhSV59q2Iy/BcFzQ8j1g=
github.com/ziggie1984/btcwallet/wtxmgr v1.5.1-0.20250409134448-0a7b1137338f/go.mod h1:lzVbDkk/jRao2ib5kge46aLZW1yFc8RFNycdYpnsmZA=
go.etcd.io/bbolt v1.3.11 h1:yGEzV1wPz2yVCLsD8ZAiGHhHVlczyC9d1rP43/VCRJ0=
go.etcd.io/bbolt v1.3.11/go.mod h1:dksAq7YMXoljX0xu6VF5DMZGbhYYoLUalEiSySYAS4I=
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
Expand Down
6 changes: 4 additions & 2 deletions waddrmgr/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,9 @@ func hexToBytes(origHex string) []byte {
func emptyDB(t *testing.T) (tearDownFunc func(), db walletdb.DB) {
dirName := t.TempDir()
dbPath := filepath.Join(dirName, "mgrtest.db")
db, err := walletdb.Create("bdb", dbPath, true, defaultDBTimeout)
db, err := walletdb.Create(
"bdb", dbPath, true, defaultDBTimeout, false,
)
if err != nil {
_ = os.RemoveAll(dirName)
t.Fatalf("createDbNamespace: unexpected error: %v", err)
Expand All @@ -269,7 +271,7 @@ func setupManager(t *testing.T) (tearDownFunc func(), db walletdb.DB, mgr *Manag
dirName := t.TempDir()

dbPath := filepath.Join(dirName, "mgrtest.db")
db, err := walletdb.Create("bdb", dbPath, true, defaultDBTimeout)
db, err := walletdb.Create("bdb", dbPath, true, defaultDBTimeout, false)
if err != nil {
_ = os.RemoveAll(dirName)
t.Fatalf("createDbNamespace: unexpected error: %v", err)
Expand Down
4 changes: 3 additions & 1 deletion waddrmgr/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,9 @@ func testConvertWatchingOnly(tc *testContext) bool {
defer os.Remove(woMgrName)

// Open the new database copy and get the address manager namespace.
db, err := walletdb.Open("bdb", woMgrName, true, defaultDBTimeout)
db, err := walletdb.Open(
"bdb", woMgrName, true, defaultDBTimeout, false,
)
if err != nil {
tc.t.Errorf("openDbNamespace: unexpected error: %v", err)
return false
Expand Down
4 changes: 2 additions & 2 deletions wallet/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ func (l *Loader) createNewWallet(pubPassphrase, privPassphrase []byte,
return nil, err
}
l.db, err = walletdb.Create(
"bdb", dbPath, l.noFreelistSync, l.timeout,
"bdb", dbPath, l.noFreelistSync, l.timeout, false,
)
if err != nil {
return nil, err
Expand Down Expand Up @@ -331,7 +331,7 @@ func (l *Loader) OpenExistingWallet(pubPassphrase []byte,
// Open the database using the boltdb backend.
dbPath := filepath.Join(l.dbDirPath, WalletDBName)
l.db, err = walletdb.Open(
"bdb", dbPath, l.noFreelistSync, l.timeout,
"bdb", dbPath, l.noFreelistSync, l.timeout, false,
)
if err != nil {
log.Errorf("Failed to open database: %v", err)
Expand Down
2 changes: 1 addition & 1 deletion walletsetup.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func createSimulationWallet(cfg *config) error {
fmt.Println("Creating the wallet...")

// Create the wallet database backed by bolt db.
db, err := walletdb.Create("bdb", dbPath, true, cfg.DBTimeout)
db, err := walletdb.Create("bdb", dbPath, true, cfg.DBTimeout, false)
if err != nil {
return err
}
Expand Down