diff --git a/btcwallet.go b/btcwallet.go index 49b0074d73..f318f60af2 100644 --- a/btcwallet.go +++ b/btcwallet.go @@ -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, ) if err != nil { log.Errorf("Unable to create Neutrino DB: %s", err) diff --git a/cmd/dropwtxmgr/main.go b/cmd/dropwtxmgr/main.go index a9dcf867ed..507bc6acc9 100644 --- a/cmd/dropwtxmgr/main.go +++ b/cmd/dropwtxmgr/main.go @@ -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 diff --git a/go.mod b/go.mod index 92cf1c776f..7f4e600203 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 34c19d2aa1..9b52280ac1 100644 --- a/go.sum +++ b/go.sum @@ -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= @@ -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= diff --git a/waddrmgr/common_test.go b/waddrmgr/common_test.go index 3859016c72..e91eafa663 100644 --- a/waddrmgr/common_test.go +++ b/waddrmgr/common_test.go @@ -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) @@ -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) diff --git a/waddrmgr/manager_test.go b/waddrmgr/manager_test.go index 13bc171342..f0a5d8af93 100644 --- a/waddrmgr/manager_test.go +++ b/waddrmgr/manager_test.go @@ -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 diff --git a/wallet/loader.go b/wallet/loader.go index 05daaa9d57..6e2f5fc3df 100644 --- a/wallet/loader.go +++ b/wallet/loader.go @@ -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 @@ -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) diff --git a/walletsetup.go b/walletsetup.go index 09287707e7..f43119413e 100644 --- a/walletsetup.go +++ b/walletsetup.go @@ -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 }