aboutsummaryrefslogtreecommitdiff
path: root/src/bench/coin_selection.cpp
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2020-08-31 15:30:51 -0400
committerAndrew Chow <achow101-github@achow101.com>2020-09-29 14:25:21 -0400
commit6148a8acda5e594bb9b3b2d989056f9e03ddbdbd (patch)
tree2ab4579b18956238a978f63802dc6c6839a44ef2 /src/bench/coin_selection.cpp
parent2acad036575ec998f8bbe4f10f6206b1c8ad3d23 (diff)
Move GroupOutputs into SelectCoinsMinConf
Diffstat (limited to 'src/bench/coin_selection.cpp')
-rw-r--r--src/bench/coin_selection.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/bench/coin_selection.cpp b/src/bench/coin_selection.cpp
index a5455bc7a1..6cb45ec7a5 100644
--- a/src/bench/coin_selection.cpp
+++ b/src/bench/coin_selection.cpp
@@ -42,21 +42,19 @@ static void CoinSelection(benchmark::Bench& bench)
}
addCoin(3 * COIN, wallet, wtxs);
- // Create groups
- std::vector<OutputGroup> groups;
+ // Create coins
+ std::vector<COutput> coins;
for (const auto& wtx : wtxs) {
- COutput output(wtx.get(), 0 /* iIn */, 6 * 24 /* nDepthIn */, true /* spendable */, true /* solvable */, true /* safe */);
- groups.emplace_back();
- groups.back().Insert(output.GetInputCoin(), 6, false, 0, 0);
+ coins.emplace_back(wtx.get(), 0 /* iIn */, 6 * 24 /* nDepthIn */, true /* spendable */, true /* solvable */, true /* safe */);
}
const CoinEligibilityFilter filter_standard(1, 6, 0);
- const CoinSelectionParams coin_selection_params(true, 34, 148, CFeeRate(0), 0);
+ const CoinSelectionParams coin_selection_params(true, 34, 148, CFeeRate(0), 0, false);
bench.run([&] {
std::set<CInputCoin> setCoinsRet;
CAmount nValueRet;
bool bnb_used;
- bool success = wallet.SelectCoinsMinConf(1003 * COIN, filter_standard, groups, setCoinsRet, nValueRet, coin_selection_params, bnb_used);
+ bool success = wallet.SelectCoinsMinConf(1003 * COIN, filter_standard, coins, setCoinsRet, nValueRet, coin_selection_params, bnb_used);
assert(success);
assert(nValueRet == 1003 * COIN);
assert(setCoinsRet.size() == 2);