diff options
| author | Andrew Chow <[email protected]> | 2019-10-07 14:11:34 -0400 |
|---|---|---|
| committer | Andrew Chow <[email protected]> | 2020-01-23 16:34:28 -0500 |
| commit | fadc08ad944cad42e805228cdd58e0332f4d7184 (patch) | |
| tree | f0b992bca5359762a0cc8b8cc702ee3cb8e7b9cf /src/test/util/wallet.cpp | |
| parent | wallet: Improve CWallet:MarkDestinationsDirty (diff) | |
| download | discoin-fadc08ad944cad42e805228cdd58e0332f4d7184.tar.xz discoin-fadc08ad944cad42e805228cdd58e0332f4d7184.zip | |
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/util/wallet.cpp')
| -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 226d2df6e..fd6012e9f 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); |