aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/test
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-07-01 13:22:52 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-07-01 13:26:01 +0200
commit20f3cd75f6af8f75de943fef43b4b7769746f732 (patch)
treed53ff4d012cf5f2b4535a41fc27a3a10bebe606d /src/wallet/test
parentda50997a3ee7d3b73180c71cd454580af49c2244 (diff)
downloadbitcoin-20f3cd75f6af8f75de943fef43b4b7769746f732.tar.xz
wallet: Revert input selection post-pruning
This reverts PR #4906, "Coinselection prunes extraneous inputs from ApproximateBestSubset". Apparently the previous behavior of slightly over-estimating the set of inputs was useful in cleaning up UTXOs. See also #7664, #7657, as well as 2016-07-01 discussion on #bitcoin-core-dev IRC.
Diffstat (limited to 'src/wallet/test')
-rw-r--r--src/wallet/test/wallet_tests.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp
index 0a4f06ba88..c6c5058984 100644
--- a/src/wallet/test/wallet_tests.cpp
+++ b/src/wallet/test/wallet_tests.cpp
@@ -349,20 +349,6 @@ BOOST_AUTO_TEST_CASE(ApproximateBestSubset)
BOOST_CHECK(wallet.SelectCoinsMinConf(1003 * COIN, 1, 6, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, 1003 * COIN);
BOOST_CHECK_EQUAL(setCoinsRet.size(), 2U);
-
- empty_wallet();
-
- // Test trimming
- for (int i = 0; i < 100; i++)
- add_coin(10 * COIN);
- for (int i = 0; i < 100; i++)
- add_coin(1000 * COIN);
-
- BOOST_CHECK(wallet.SelectCoinsMinConf(100001 * COIN, 1, 6, vCoins, setCoinsRet, nValueRet));
- // We need all 100 larger coins and exactly one small coin.
- // Superfluous small coins must be trimmed from the set:
- BOOST_CHECK_EQUAL(nValueRet, 100010 * COIN);
- BOOST_CHECK_EQUAL(setCoinsRet.size(), 101);
}
BOOST_AUTO_TEST_SUITE_END()