Open JssDWt opened 3 months ago
There's other occasions too where the locks of manager and scoped manager are reversed. A decision must be made:
Probably manager first, then scoped manager makes most sense.
ImportPublicKey
and importScriptAddress
have this issue
We've been using this, apparently successfully, over the last few months: https://github.com/breez/btcwallet/commit/04ba1085f2dcdbb028163a3a489efa17226b7f07
Let me know if I should PR that.
Looks like a worthy PR, sure. Thanks for investigating in the first place!
Looks like a worthy PR, sure. Thanks for investigating in the first place!
The
importScriptAddress
function ofScopedKeyManager
takes a Lock onScopedKeyManager
, then a Lock onManager
.The
Address
function ofManager
takes a RLock onManager
, then a RLock/Lock onScopedKeyManager
.Combining the two can lead to a deadlock.