Skip to content

Commit 2dfb6d5

Browse files
committed
bench: Move setup out of bench
1 parent 76a4a4b commit 2dfb6d5

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/bench/coin_selection.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,16 +205,12 @@ static CAmount make_hard_case(int utxos, std::vector<OutputGroup>& utxo_pool)
205205

206206
static void BnBExhaustion(benchmark::Bench& bench)
207207
{
208-
// Setup
209208
std::vector<OutputGroup> utxo_pool;
210209

210+
CAmount target = make_hard_case(17, utxo_pool);
211211
bench.run([&] {
212212
// Benchmark
213-
CAmount target = make_hard_case(17, utxo_pool);
214213
SelectCoinsBnB(utxo_pool, target, 0, MAX_STANDARD_TX_WEIGHT); // Should exhaust
215-
216-
// Cleanup
217-
utxo_pool.clear();
218214
});
219215
}
220216

0 commit comments

Comments
 (0)