forked from crypto-power/cryptopower
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dcr: Avoid freeze inside db transaction. (crypto-power#493)
In dcr there's a request for the current wallet inside a db transaction. If a user closes a wallet during *asset.IndexTransactions() It will get the lock at *dcrLoader.UnloadWallet() but then get stuck at l.db.Close() because it cannot close the db while a transation is taking place. So the request in the transation gets stuck trying to get the lock. Prevent that by holding a db lock while indexing transactions that stops the wallet from being unloaded during that time.
- Loading branch information
1 parent
d56b981
commit d34f1f2
Showing
3 changed files
with
32 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters