diff options
author | Andrew Chow <achow101-github@achow101.com> | 2019-10-07 14:11:34 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2020-01-23 16:34:28 -0500 |
commit | fadc08ad944cad42e805228cdd58e0332f4d7184 (patch) | |
tree | f0b992bca5359762a0cc8b8cc702ee3cb8e7b9cf /src/test | |
parent | f5be479694d4dbaf59eef562d80fbeacb3bb7dc1 (diff) | |
download | bitcoin-fadc08ad944cad42e805228cdd58e0332f4d7184.tar.xz |
Locking: Lock cs_KeyStore instead of cs_wallet in legacy keyman
This commit only affects locking behavior and doesn't have other changes.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/util/wallet.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/test/util/wallet.cpp b/src/test/util/wallet.cpp index 226d2df6e4..fd6012e9fe 100644 --- a/src/test/util/wallet.cpp +++ b/src/test/util/wallet.cpp @@ -27,8 +27,7 @@ std::string getnewaddress(CWallet& w) void importaddress(CWallet& wallet, const std::string& address) { auto spk_man = wallet.GetLegacyScriptPubKeyMan(); - LOCK(wallet.cs_wallet); - AssertLockHeld(spk_man->cs_wallet); + LOCK2(wallet.cs_wallet, spk_man->cs_KeyStore); const auto dest = DecodeDestination(address); assert(IsValidDestination(dest)); const auto script = GetScriptForDestination(dest); |