Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/test/coinselector_tests.cpp
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | static void add_coin(CWallet &wallet, const Amount nValue, int nAge = 6 * 24, | ||||
} | } | ||||
COutput output(wtx.get(), nInput, nAge, true /* spendable */, | COutput output(wtx.get(), nInput, nAge, true /* spendable */, | ||||
true /* solvable */, true /* safe */); | true /* solvable */, true /* safe */); | ||||
vCoins.push_back(output); | vCoins.push_back(output); | ||||
wallet.AddToWallet(*wtx.get()); | wallet.AddToWallet(*wtx.get()); | ||||
wtxn.emplace_back(std::move(wtx)); | wtxn.emplace_back(std::move(wtx)); | ||||
} | } | ||||
static void empty_wallet(void) { | static void empty_wallet() { | ||||
vCoins.clear(); | vCoins.clear(); | ||||
wtxn.clear(); | wtxn.clear(); | ||||
balance = Amount::zero(); | balance = Amount::zero(); | ||||
} | } | ||||
static bool equal_sets(CoinSet a, CoinSet b) { | static bool equal_sets(CoinSet a, CoinSet b) { | ||||
std::pair<CoinSet::iterator, CoinSet::iterator> ret = | std::pair<CoinSet::iterator, CoinSet::iterator> ret = | ||||
mismatch(a.begin(), a.end(), b.begin()); | mismatch(a.begin(), a.end(), b.begin()); | ||||
▲ Show 20 Lines • Show All 654 Lines • Show Last 20 Lines |