aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-10-31 13:19:03 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-10-31 13:48:00 +0200
commit68018e4c3e76f7e5bebf5f90ffd972c7bf01e0a0 (patch)
tree7f50ce61fcda1b8096b338a0639845ddd0f4de3f
parent7986faf2e09ea85b1d4564ce910f07a4c4de8685 (diff)
test: Avoid excessive locking of `cs_wallet`
-rw-r--r--src/wallet/test/psbt_wallet_tests.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/test/psbt_wallet_tests.cpp b/src/wallet/test/psbt_wallet_tests.cpp
index 120a20749e..dd24fa2c19 100644
--- a/src/wallet/test/psbt_wallet_tests.cpp
+++ b/src/wallet/test/psbt_wallet_tests.cpp
@@ -14,8 +14,9 @@
BOOST_FIXTURE_TEST_SUITE(psbt_wallet_tests, WalletTestingSetup)
static void import_descriptor(CWallet& wallet, const std::string& descriptor)
+ EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
{
- LOCK(wallet.cs_wallet);
+ AssertLockHeld(wallet.cs_wallet);
FlatSigningProvider provider;
std::string error;
std::unique_ptr<Descriptor> desc = Parse(descriptor, provider, error, /* require_checksum=*/ false);