This repository was archived by the owner on Jun 1, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,10 @@ const (
37
37
// bitcoind's wallet.
38
38
walletName = "satstack"
39
39
40
- errDuplicateWalletLoadMsg = "Duplicate -wallet filename specified."
41
- errWalletAlreadyLoadedMsg = "Wallet file verification failed. Refusing to load database. Data file"
40
+ errDuplicateWalletLoadMsg = "Duplicate -wallet filename specified."
41
+ errWalletAlreadyLoadedMsgOld = "Wallet file verification failed. Refusing to load database. Data file"
42
+ // Cores Responds changes so adding the new one but keeping the old for backwards compatibility
43
+ errWalletAlreadyLoadedMsgNew = "Wallet file verification failed. SQLiteDatabase: Unable to obtain an exclusive lock on the database"
42
44
)
43
45
44
46
// Bus represents a transport allowing access to Bitcoin RPC methods.
@@ -303,7 +305,12 @@ func loadOrCreateWallet(client *rpcclient.Client) (bool, error) {
303
305
return false , nil
304
306
}
305
307
306
- if rpcErr .Code == btcjson .ErrRPCWallet && strings .Contains (rpcErr .Message , errWalletAlreadyLoadedMsg ) {
308
+ if rpcErr .Code == btcjson .ErrRPCWallet && strings .Contains (rpcErr .Message , errWalletAlreadyLoadedMsgOld ) {
309
+ // wallet already loaded. Ignore the error and return.
310
+ return false , nil
311
+ }
312
+
313
+ if rpcErr .Code == btcjson .ErrRPCWallet && strings .Contains (rpcErr .Message , errWalletAlreadyLoadedMsgNew ) {
307
314
// wallet already loaded. Ignore the error and return.
308
315
return false , nil
309
316
}
You can’t perform that action at this time.
0 commit comments