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:
1 parent
d5069fc1aa
commit
6a023a6f90
1 file changed
+7
@@ -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)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user