1
1
mirror of https://github.com/bitcoin/bitcoin.git synced 2024-05-17 23:56:39 +00:00

fuzz: coinselection, BnB should never produce change

This commit is contained in:
brunoerg 2023-08-04 16:22:17 -03:00
parent b2eb558407
commit 6d9b26d56a

View File

@ -115,6 +115,7 @@ FUZZ_TARGET(coinselection)
// Run coinselection algorithms
auto result_bnb = 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);
(void)result_bnb->GetShuffledInputVector();
(void)result_bnb->GetInputSet();