mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-12 11:19:08 -05:00
fuzz: coinselection, add coverage for EligibleForSpending
This commit is contained in:
parent
2a031cb2c2
commit
90c4e6a241
1 changed files with 5 additions and 0 deletions
|
@ -93,6 +93,11 @@ FUZZ_TARGET(coinselection)
|
||||||
std::vector<OutputGroup> group_all;
|
std::vector<OutputGroup> group_all;
|
||||||
GroupCoins(fuzzed_data_provider, utxo_pool, coin_params, /*positive_only=*/false, 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
|
// Run coinselection algorithms
|
||||||
const auto result_bnb = SelectCoinsBnB(group_pos, target, cost_of_change, MAX_STANDARD_TX_WEIGHT);
|
const auto result_bnb = SelectCoinsBnB(group_pos, target, cost_of_change, MAX_STANDARD_TX_WEIGHT);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue