diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2022-08-03 19:04:36 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2023-03-06 09:45:40 -0300 |
commit | 6a302d40dfcc33b15bf27a1d3fcc04bfd3cbda44 (patch) | |
tree | f532e7e41b8d128dd176904d531c86f7a3c1786c /src/wallet/test/coinselector_tests.cpp | |
parent | bd91ed1cb2cc804f824d1b204513ac2afb7d5e28 (diff) |
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.cpp | 2 |
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; } |