mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Added a test for the pruning of extraneous inputs after ApproximateBestSet
This commit is contained in:
@@ -328,4 +328,22 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
|
||||
empty_wallet();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(pruning_in_ApproximateBestSet)
|
||||
{
|
||||
CoinSet setCoinsRet;
|
||||
CAmount nValueRet;
|
||||
|
||||
LOCK(wallet.cs_wallet);
|
||||
|
||||
empty_wallet();
|
||||
for (int i = 0; i < 12; i++)
|
||||
{
|
||||
add_coin(10*CENT);
|
||||
}
|
||||
add_coin(100*CENT);
|
||||
add_coin(100*CENT);
|
||||
BOOST_CHECK(wallet.SelectCoinsMinConf(221*CENT, 1, 6, vCoins, setCoinsRet, nValueRet));
|
||||
BOOST_CHECK_EQUAL(nValueRet, 230*CENT);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
Reference in New Issue
Block a user