fuzz: disable BnB when SFFO is enabled

Github-Pull: #28994
Rebased-From: 576bee88fd
This commit is contained in:
furszy 2023-12-04 11:36:20 -03:00 committed by fanquake
parent 903b4623d3
commit 35039ac3cc
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1
1 changed files with 2 additions and 1 deletions

View File

@ -116,7 +116,8 @@ FUZZ_TARGET(coinselection)
}
// Run coinselection algorithms
auto result_bnb = SelectCoinsBnB(group_pos, target, coin_params.m_cost_of_change, MAX_STANDARD_TX_WEIGHT);
auto result_bnb = coin_params.m_subtract_fee_outputs ? util::Error{Untranslated("BnB disabled when SFFO is enabled")} :
SelectCoinsBnB(group_pos, target, coin_params.m_cost_of_change, MAX_STANDARD_TX_WEIGHT);
if (result_bnb) {
assert(result_bnb->GetChange(coin_params.m_cost_of_change, CAmount{0}) == 0);
assert(result_bnb->GetSelectedValue() >= target);