test: Avoid excessive locking of cs_wallet

This commit is contained in:
Hennadii Stepanov 2021-10-31 13:19:03 +02:00
parent 7986faf2e0
commit 68018e4c3e
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F

View File

@ -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);