mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-03 09:43:55 +02:00
Locking: Lock cs_KeyStore instead of cs_wallet in legacy keyman
This commit only affects locking behavior and doesn't have other changes.
This commit is contained in:
@@ -700,7 +700,7 @@ UniValue dumpprivkey(const JSONRPCRequest& request)
|
||||
LegacyScriptPubKeyMan& spk_man = EnsureLegacyScriptPubKeyMan(*wallet);
|
||||
|
||||
auto locked_chain = pwallet->chain().lock();
|
||||
LOCK(pwallet->cs_wallet);
|
||||
LOCK2(pwallet->cs_wallet, spk_man.cs_KeyStore);
|
||||
|
||||
EnsureWalletIsUnlocked(pwallet);
|
||||
|
||||
@@ -751,8 +751,7 @@ UniValue dumpwallet(const JSONRPCRequest& request)
|
||||
LegacyScriptPubKeyMan& spk_man = EnsureLegacyScriptPubKeyMan(*wallet);
|
||||
|
||||
auto locked_chain = pwallet->chain().lock();
|
||||
LOCK(pwallet->cs_wallet);
|
||||
AssertLockHeld(spk_man.cs_wallet);
|
||||
LOCK2(pwallet->cs_wallet, spk_man.cs_KeyStore);
|
||||
|
||||
EnsureWalletIsUnlocked(pwallet);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user