diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2022-04-22 17:31:28 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2022-06-08 10:25:16 -0300 |
commit | 4ce235ef8f9a9dddc52d7ab60c8f71bda1d38873 (patch) | |
tree | 256749d54ebf6fae7ee0ae533bf5ad4de0be45ab /src/wallet/test/wallet_tests.cpp | |
parent | fbb90c44ac8a4121ce6ba7fcbf864084f35734ba (diff) |
wallet: return 'CoinsResult' struct in `AvailableCoins`
Instead of accepting a `vCoins` reference that is cleared at the beginning of the method.
Note:
This new struct, down the commits line, will contain other `AvailableCoins` useful results.
Diffstat (limited to 'src/wallet/test/wallet_tests.cpp')
-rw-r--r-- | src/wallet/test/wallet_tests.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp index 70863f5464..0c03b2f4a2 100644 --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -583,9 +583,7 @@ BOOST_FIXTURE_TEST_CASE(ListCoinsTest, ListCoinsTestingSetup) // Lock both coins. Confirm number of available coins drops to 0. { LOCK(wallet->cs_wallet); - std::vector<COutput> available; - AvailableCoinsListUnspent(*wallet, available); - BOOST_CHECK_EQUAL(available.size(), 2U); + BOOST_CHECK_EQUAL(AvailableCoinsListUnspent(*wallet).coins.size(), 2U); } for (const auto& group : list) { for (const auto& coin : group.second) { @@ -595,9 +593,7 @@ BOOST_FIXTURE_TEST_CASE(ListCoinsTest, ListCoinsTestingSetup) } { LOCK(wallet->cs_wallet); - std::vector<COutput> available; - AvailableCoinsListUnspent(*wallet, available); - BOOST_CHECK_EQUAL(available.size(), 0U); + BOOST_CHECK_EQUAL(AvailableCoinsListUnspent(*wallet).coins.size(), 0U); } // Confirm ListCoins still returns same result as before, despite coins // being locked. |