From 68018e4c3e76f7e5bebf5f90ffd972c7bf01e0a0 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sun, 31 Oct 2021 13:19:03 +0200 Subject: test: Avoid excessive locking of `cs_wallet` --- src/wallet/test/psbt_wallet_tests.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/wallet') 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 desc = Parse(descriptor, provider, error, /* require_checksum=*/ false); -- cgit v1.2.3