removed duplicate calling of GetDescriptorScriptPubKeyMan

Removed duplicate call to GetDescriptorScriptPubKeyMan and
Instead of checking linearly I have used find method so time complexity reduced significantly for GetDescriptorScriptPubKeyMan
after this fix improved performance of importdescriptor part refs #32013.
This commit is contained in:
Saikiran
2025-03-10 15:20:55 +05:30
parent e568c1dd13
commit 55b931934a
12 changed files with 45 additions and 29 deletions

View File

@@ -69,7 +69,8 @@ static void AddKey(CWallet& wallet, const CKey& key)
assert(descs.size() == 1);
auto& desc = descs.at(0);
WalletDescriptor w_desc(std::move(desc), 0, 0, 1, 1);
if (!wallet.AddWalletDescriptor(w_desc, provider, "", false)) assert(false);
auto spk_manager = *Assert(wallet.AddWalletDescriptor(w_desc, provider, "", false));
assert(spk_manager);
}
BOOST_FIXTURE_TEST_CASE(scan_for_wallet_transactions, TestChain100Setup)