aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrunoerg <brunoely.gc@gmail.com>2023-05-04 11:57:18 -0300
committerbrunoerg <brunoely.gc@gmail.com>2023-08-22 14:41:57 -0300
commit90c4e6a241eee605809ab1b4331e620b92f05933 (patch)
tree8db33c7cd0580d551120de40c49231374d8c3ef8
parent2a031cb2c218e288a9784d677705a7d2bc1c2d2b (diff)
fuzz: coinselection, add coverage for `EligibleForSpending`
-rw-r--r--src/wallet/test/fuzz/coinselection.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wallet/test/fuzz/coinselection.cpp b/src/wallet/test/fuzz/coinselection.cpp
index 6c372b7852..6545d9ad9e 100644
--- a/src/wallet/test/fuzz/coinselection.cpp
+++ b/src/wallet/test/fuzz/coinselection.cpp
@@ -93,6 +93,11 @@ FUZZ_TARGET(coinselection)
std::vector<OutputGroup> group_all;
GroupCoins(fuzzed_data_provider, utxo_pool, coin_params, /*positive_only=*/false, group_all);
+ for (const OutputGroup& group : group_all) {
+ const CoinEligibilityFilter filter(fuzzed_data_provider.ConsumeIntegral<int>(), fuzzed_data_provider.ConsumeIntegral<int>(), fuzzed_data_provider.ConsumeIntegral<uint64_t>());
+ (void)group.EligibleForSpending(filter);
+ }
+
// Run coinselection algorithms
const auto result_bnb = SelectCoinsBnB(group_pos, target, cost_of_change, MAX_STANDARD_TX_WEIGHT);