diff options
author | Andrew Chow <github@achow101.com> | 2023-02-03 17:32:35 -0500 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2023-02-03 17:32:46 -0500 |
commit | d71b0e78eb0f24e8b147657c8561d74e441c2503 (patch) | |
tree | f67b1682f92ad2af8e28f4b4a30ec0dbbb5b4bdd | |
parent | e2ae5c349cd9c0e1db090ca3df3160f26d5c105d (diff) | |
parent | fb1c6c14c11ccd4833c1a24f77c507f098d369ad (diff) |
Merge bitcoin/bitcoin#25966: test: Remove redundant test
fb1c6c14c11ccd4833c1a24f77c507f098d369ad test: Remove redundant test (yancy)
Pull request description:
I can't think of any reason to keep this test case around labeled [fix me](https://github.com/bitcoin/bitcoin/blob/master/src/wallet/test/coinselector_tests.cpp#L242). The test was originally added [here](https://github.com/bitcoin/bitcoin/commit/4566ab75f277612425337bf7786c1d3a410d894a) however there was never an assertion about the coins that should be selected, only that a solution is found (which is a redundant solution to the test [above](https://github.com/bitcoin/bitcoin/blob/master/src/wallet/test/coinselector_tests.cpp#L222)). The comment was later added here to [fix](https://github.com/bitcoin/bitcoin/commit/384273260a6ccbcf79dade0830011f528e5a1581) it, however it's unclear what exactly it's testing. A test was later added [here](https://github.com/bitcoin/bitcoin/blob/master/src/wallet/test/coinselector_tests.cpp#L366) where if the [long term fee](https://github.com/bitcoin/bitcoin/blob/master/src/wallet/test/coinselector_tests.cpp#L357) is less than the current [fee](https://github.com/bitcoin/bitcoin/blob/master/src/wallet/test/coinselector_tests.cpp#L356), then select fewer UTXOs, which may have been the original intent.
ACKs for top commit:
S3RK:
ACK fb1c6c14c11ccd4833c1a24f77c507f098d369ad
Zero-1729:
Concept ACK fb1c6c14c11ccd4833c1a24f77c507f098d369ad
achow101:
ACK fb1c6c14c11ccd4833c1a24f77c507f098d369ad
Tree-SHA512: bce2cdae669c144ffaa130237a1643e3b6728e13d603cebf5d9493c4c7c68b3635868e4d93d210783c2ded2a871f185ca09a2053168c05b26a1e056ff6edf68f
-rw-r--r-- | src/wallet/test/coinselector_tests.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/wallet/test/coinselector_tests.cpp b/src/wallet/test/coinselector_tests.cpp index 2e12b5b1d4..5281d0589a 100644 --- a/src/wallet/test/coinselector_tests.cpp +++ b/src/wallet/test/coinselector_tests.cpp @@ -232,17 +232,6 @@ BOOST_AUTO_TEST_CASE(bnb_search_test) BOOST_CHECK_EQUAL(result5->GetSelectedValue(), 10 * CENT); expected_result.Clear(); - // Negative effective value - // Select 10 Cent but have 1 Cent not be possible because too small - add_coin(5 * CENT, 5, expected_result); - add_coin(3 * CENT, 3, expected_result); - add_coin(2 * CENT, 2, expected_result); - const auto result6 = SelectCoinsBnB(GroupCoins(utxo_pool), 10 * CENT, 5000); - BOOST_CHECK(result6); - BOOST_CHECK_EQUAL(result6->GetSelectedValue(), 10 * CENT); - // FIXME: this test is redundant with the above, because 1 Cent is selected, not "too small" - // BOOST_CHECK(EquivalentResult(expected_result, *result)); - // Select 0.25 Cent, not possible BOOST_CHECK(!SelectCoinsBnB(GroupCoins(utxo_pool), 0.25 * CENT, 0.5 * CENT)); expected_result.Clear(); |