forked from jl777/SuperNET
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix UTXO rpc clients dead lock on balance/unspent requests. (#887)
* Try removing ElectrumClientImpl::list_unspent_subs/get_balance_subs. * Add ConcurrentRequestState and use it for scripthash_get_balance. * Prevent long holding of my_orders mutex during setprice. * Add ConcurrentRequestMap and use it for balance/unspent requests. * Use list_unspent_concurrent_map in list_unspent_impl. * Put back holding my_orders during balance check. We can have a race condition if 2 concurrent setprice calls are made with cancel_previous: true. So both orders will be created while it should create only 1 of them. * Fixes after review. * Avoid holding my_maker_orders mutex during balance checks on setprice. * Explicitly cancel previous orders on balance check errors.
- Loading branch information
1 parent
5933e5a
commit 6c23530
Showing
4 changed files
with
192 additions
and
155 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
Oops, something went wrong.