Skip to content

Commit d71b0e7

Browse files
committed
Merge bitcoin/bitcoin#25966: test: Remove redundant test
fb1c6c1 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](bitcoin/bitcoin@4566ab7) 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](bitcoin/bitcoin@3842732) 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 fb1c6c1 Zero-1729: Concept ACK fb1c6c1 achow101: ACK fb1c6c1 Tree-SHA512: bce2cdae669c144ffaa130237a1643e3b6728e13d603cebf5d9493c4c7c68b3635868e4d93d210783c2ded2a871f185ca09a2053168c05b26a1e056ff6edf68f
2 parents e2ae5c3 + fb1c6c1 commit d71b0e7

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/wallet/test/coinselector_tests.cpp

-11
Original file line numberDiff line numberDiff line change
@@ -232,17 +232,6 @@ BOOST_AUTO_TEST_CASE(bnb_search_test)
232232
BOOST_CHECK_EQUAL(result5->GetSelectedValue(), 10 * CENT);
233233
expected_result.Clear();
234234

235-
// Negative effective value
236-
// Select 10 Cent but have 1 Cent not be possible because too small
237-
add_coin(5 * CENT, 5, expected_result);
238-
add_coin(3 * CENT, 3, expected_result);
239-
add_coin(2 * CENT, 2, expected_result);
240-
const auto result6 = SelectCoinsBnB(GroupCoins(utxo_pool), 10 * CENT, 5000);
241-
BOOST_CHECK(result6);
242-
BOOST_CHECK_EQUAL(result6->GetSelectedValue(), 10 * CENT);
243-
// FIXME: this test is redundant with the above, because 1 Cent is selected, not "too small"
244-
// BOOST_CHECK(EquivalentResult(expected_result, *result));
245-
246235
// Select 0.25 Cent, not possible
247236
BOOST_CHECK(!SelectCoinsBnB(GroupCoins(utxo_pool), 0.25 * CENT, 0.5 * CENT));
248237
expected_result.Clear();

0 commit comments

Comments
 (0)