Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/test/wallet_tests.cpp
Show First 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | for (int i = 0; i < RUN_TESTS; i++) { | ||||
BOOST_CHECK_EQUAL(nValueRet, 1 * CENT); | BOOST_CHECK_EQUAL(nValueRet, 1 * CENT); | ||||
// add a mature 2 cent coin | // add a mature 2 cent coin | ||||
add_coin(wallet, 2 * CENT); | add_coin(wallet, 2 * CENT); | ||||
// we can't make 3 cents of mature coins | // we can't make 3 cents of mature coins | ||||
BOOST_CHECK(!wallet.SelectCoinsMinConf(3 * CENT, 1, 6, 0, vCoins, | BOOST_CHECK(!wallet.SelectCoinsMinConf(3 * CENT, 1, 6, 0, vCoins, | ||||
setCoinsRet, nValueRet)); | setCoinsRet, nValueRet)); | ||||
// we can make 3 cents of new coins | // we can make 3 cents of new coins | ||||
BOOST_CHECK(wallet.SelectCoinsMinConf(3 * CENT, 1, 1, 0, vCoins, | BOOST_CHECK(wallet.SelectCoinsMinConf(3 * CENT, 1, 1, 0, vCoins, | ||||
setCoinsRet, nValueRet)); | setCoinsRet, nValueRet)); | ||||
BOOST_CHECK_EQUAL(nValueRet, 3 * CENT); | BOOST_CHECK_EQUAL(nValueRet, 3 * CENT); | ||||
// add a mature 5 cent coin, | // add a mature 5 cent coin, | ||||
add_coin(wallet, 5 * CENT); | add_coin(wallet, 5 * CENT); | ||||
// a new 10 cent coin sent from one of our own addresses | // a new 10 cent coin sent from one of our own addresses | ||||
add_coin(wallet, 10 * CENT, 3, true); | add_coin(wallet, 10 * CENT, 3, true); | ||||
▲ Show 20 Lines • Show All 678 Lines • Show Last 20 Lines |