Skip to content

Commit 6148a8a

Browse files
committed
Move GroupOutputs into SelectCoinsMinConf
1 parent 2acad03 commit 6148a8a

File tree

4 files changed

+75
-66
lines changed

4 files changed

+75
-66
lines changed

src/bench/coin_selection.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,19 @@ static void CoinSelection(benchmark::Bench& bench)
4242
}
4343
addCoin(3 * COIN, wallet, wtxs);
4444

45-
// Create groups
46-
std::vector<OutputGroup> groups;
45+
// Create coins
46+
std::vector<COutput> coins;
4747
for (const auto& wtx : wtxs) {
48-
COutput output(wtx.get(), 0 /* iIn */, 6 * 24 /* nDepthIn */, true /* spendable */, true /* solvable */, true /* safe */);
49-
groups.emplace_back();
50-
groups.back().Insert(output.GetInputCoin(), 6, false, 0, 0);
48+
coins.emplace_back(wtx.get(), 0 /* iIn */, 6 * 24 /* nDepthIn */, true /* spendable */, true /* solvable */, true /* safe */);
5149
}
5250

5351
const CoinEligibilityFilter filter_standard(1, 6, 0);
54-
const CoinSelectionParams coin_selection_params(true, 34, 148, CFeeRate(0), 0);
52+
const CoinSelectionParams coin_selection_params(true, 34, 148, CFeeRate(0), 0, false);
5553
bench.run([&] {
5654
std::set<CInputCoin> setCoinsRet;
5755
CAmount nValueRet;
5856
bool bnb_used;
59-
bool success = wallet.SelectCoinsMinConf(1003 * COIN, filter_standard, groups, setCoinsRet, nValueRet, coin_selection_params, bnb_used);
57+
bool success = wallet.SelectCoinsMinConf(1003 * COIN, filter_standard, coins, setCoinsRet, nValueRet, coin_selection_params, bnb_used);
6058
assert(success);
6159
assert(nValueRet == 1003 * COIN);
6260
assert(setCoinsRet.size() == 2);

0 commit comments

Comments
 (0)