Skip to content

Commit

Permalink
fuzz: coinselection: cover SetBumpFeeDiscount
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoerg committed Feb 5, 2025
1 parent 33932d3 commit 0289f03
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/wallet/test/fuzz/coinselection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ FUZZ_TARGET(coinselection)
assert(result_srd->GetSelectedValue() >= target);
assert(result_srd->GetChange(CHANGE_LOWER, coin_params.m_change_fee) > 0); // Demonstrate that SRD creates change of at least CHANGE_LOWER
assert(result_srd->GetWeight() <= max_selection_weight);
result_srd->SetBumpFeeDiscount(ConsumeMoney(fuzzed_data_provider));
result_srd->RecalculateWaste(coin_params.min_viable_change, coin_params.m_cost_of_change, coin_params.m_change_fee);
(void)result_srd->GetShuffledInputVector();
(void)result_srd->GetInputSet();
Expand All @@ -285,6 +286,7 @@ FUZZ_TARGET(coinselection)
if (result_knapsack) {
assert(result_knapsack->GetSelectedValue() >= target);
assert(result_knapsack->GetWeight() <= max_selection_weight);
result_knapsack->SetBumpFeeDiscount(ConsumeMoney(fuzzed_data_provider));
result_knapsack->RecalculateWaste(coin_params.min_viable_change, coin_params.m_cost_of_change, coin_params.m_change_fee);
(void)result_knapsack->GetShuffledInputVector();
(void)result_knapsack->GetInputSet();
Expand Down

0 comments on commit 0289f03

Please sign in to comment.