mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-20 14:05:23 +01:00
tests: Add KnapsackGroupOutputs helper function
In order to change the KnapsackSolver tests to call KnapsackSolver, we need KnapsackGroupOutputs to create the OutputGroups filtered with the filter criteria.
This commit is contained in:
parent
d5069fc1aa
commit
6a023a6f90
1 changed files with 7 additions and 0 deletions
|
@ -137,6 +137,13 @@ inline std::vector<OutputGroup>& GroupCoins(const std::vector<COutput>& coins)
|
|||
return static_groups;
|
||||
}
|
||||
|
||||
inline std::vector<OutputGroup>& KnapsackGroupOutputs(const CoinEligibilityFilter& filter)
|
||||
{
|
||||
static std::vector<OutputGroup> static_groups;
|
||||
static_groups = testWallet.GroupOutputs(vCoins, coin_selection_params, filter, /* positive_only */false);
|
||||
return static_groups;
|
||||
}
|
||||
|
||||
// Branch and bound coin selection tests
|
||||
BOOST_AUTO_TEST_CASE(bnb_search_test)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue