aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/test/coinselector_tests.cpp
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2022-08-03 19:04:36 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2023-03-06 09:45:40 -0300
commit6a302d40dfcc33b15bf27a1d3fcc04bfd3cbda44 (patch)
treef532e7e41b8d128dd176904d531c86f7a3c1786c /src/wallet/test/coinselector_tests.cpp
parentbd91ed1cb2cc804f824d1b204513ac2afb7d5e28 (diff)
downloadbitcoin-6a302d40dfcc33b15bf27a1d3fcc04bfd3cbda44.tar.xz
wallet: single output groups filtering and grouping process
Optimizes coin selection by performing the "group outputs" procedure only once, outside the "attempt selection" process. Avoiding the repeated execution of the 'GroupOutputs' operation that occurs on each coin eligibility filters (up to 8 of them); then for every coin vector type plus one for all the coins together. This also let us not perform coin selection over coin eligibility filtered groups that don't add new elements. (because, if the previous round failed, and the subsequent one has the same coins, then this new round will fail again).
Diffstat (limited to 'src/wallet/test/coinselector_tests.cpp')
-rw-r--r--src/wallet/test/coinselector_tests.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/test/coinselector_tests.cpp b/src/wallet/test/coinselector_tests.cpp
index 841d762932..8f626addde 100644
--- a/src/wallet/test/coinselector_tests.cpp
+++ b/src/wallet/test/coinselector_tests.cpp
@@ -154,7 +154,7 @@ inline std::vector<OutputGroup>& KnapsackGroupOutputs(const CoinsResult& availab
/*avoid_partial=*/ false,
};
static OutputGroupTypeMap static_groups;
- static_groups = GroupOutputs(wallet, available_coins, coin_selection_params, {filter});
+ static_groups = GroupOutputs(wallet, available_coins, coin_selection_params, {{filter}})[filter];
return static_groups.all_groups.mixed_group;
}