diff options
author | brunoerg <brunoely.gc@gmail.com> | 2023-05-04 11:57:18 -0300 |
---|---|---|
committer | brunoerg <brunoely.gc@gmail.com> | 2023-08-22 14:41:57 -0300 |
commit | 90c4e6a241eee605809ab1b4331e620b92f05933 (patch) | |
tree | 8db33c7cd0580d551120de40c49231374d8c3ef8 | |
parent | 2a031cb2c218e288a9784d677705a7d2bc1c2d2b (diff) |
fuzz: coinselection, add coverage for `EligibleForSpending`
-rw-r--r-- | src/wallet/test/fuzz/coinselection.cpp | 5 |
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); |