diff options
author | Andrew Chow <achow101-github@achow101.com> | 2021-10-12 20:43:12 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2021-10-15 15:23:35 -0400 |
commit | 4b1588c6bd96743b333cc291e19a9fc76dc8cdf1 (patch) | |
tree | edc5bf5cd51235ab473740793d86d67cabd0e45c /src/wallet | |
parent | 811319fea4295bfff05c23c0dcab1e24c85e8544 (diff) |
tests: Use DescriptorScriptPubKeyMan in coinselector_tests
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/test/coinselector_tests.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/wallet/test/coinselector_tests.cpp b/src/wallet/test/coinselector_tests.cpp index 6b4c2a2725..e880e13845 100644 --- a/src/wallet/test/coinselector_tests.cpp +++ b/src/wallet/test/coinselector_tests.cpp @@ -270,8 +270,9 @@ BOOST_AUTO_TEST_CASE(bnb_search_test) { std::unique_ptr<CWallet> wallet = std::make_unique<CWallet>(m_node.chain.get(), "", CreateMockWalletDatabase()); wallet->LoadWallet(); - wallet->SetupLegacyScriptPubKeyMan(); LOCK(wallet->cs_wallet); + wallet->SetWalletFlag(WALLET_FLAG_DESCRIPTORS); + wallet->SetupDescriptorScriptPubKeyMans(); std::vector<COutput> coins; CoinSet setCoinsRet; @@ -293,8 +294,9 @@ BOOST_AUTO_TEST_CASE(bnb_search_test) { std::unique_ptr<CWallet> wallet = std::make_unique<CWallet>(m_node.chain.get(), "", CreateMockWalletDatabase()); wallet->LoadWallet(); - wallet->SetupLegacyScriptPubKeyMan(); LOCK(wallet->cs_wallet); + wallet->SetWalletFlag(WALLET_FLAG_DESCRIPTORS); + wallet->SetupDescriptorScriptPubKeyMans(); std::vector<COutput> coins; CoinSet setCoinsRet; @@ -315,8 +317,9 @@ BOOST_AUTO_TEST_CASE(knapsack_solver_test) { std::unique_ptr<CWallet> wallet = std::make_unique<CWallet>(m_node.chain.get(), "", CreateMockWalletDatabase()); wallet->LoadWallet(); - wallet->SetupLegacyScriptPubKeyMan(); LOCK(wallet->cs_wallet); + wallet->SetWalletFlag(WALLET_FLAG_DESCRIPTORS); + wallet->SetupDescriptorScriptPubKeyMans(); CoinSet setCoinsRet, setCoinsRet2; CAmount nValueRet; @@ -595,8 +598,9 @@ BOOST_AUTO_TEST_CASE(ApproximateBestSubset) { std::unique_ptr<CWallet> wallet = std::make_unique<CWallet>(m_node.chain.get(), "", CreateMockWalletDatabase()); wallet->LoadWallet(); - wallet->SetupLegacyScriptPubKeyMan(); LOCK(wallet->cs_wallet); + wallet->SetWalletFlag(WALLET_FLAG_DESCRIPTORS); + wallet->SetupDescriptorScriptPubKeyMans(); CoinSet setCoinsRet; CAmount nValueRet; @@ -617,8 +621,9 @@ BOOST_AUTO_TEST_CASE(SelectCoins_test) { std::unique_ptr<CWallet> wallet = std::make_unique<CWallet>(m_node.chain.get(), "", CreateMockWalletDatabase()); wallet->LoadWallet(); - wallet->SetupLegacyScriptPubKeyMan(); LOCK(wallet->cs_wallet); + wallet->SetWalletFlag(WALLET_FLAG_DESCRIPTORS); + wallet->SetupDescriptorScriptPubKeyMans(); // Random generator stuff std::default_random_engine generator; |