Skip to content

Commit 6d9b26d

Browse files
committed
fuzz: coinselection, BnB should never produce change
1 parent b2eb558 commit 6d9b26d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/wallet/test/fuzz/coinselection.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ FUZZ_TARGET(coinselection)
115115
// Run coinselection algorithms
116116
auto result_bnb = SelectCoinsBnB(group_pos, target, coin_params.m_cost_of_change, MAX_STANDARD_TX_WEIGHT);
117117
if (result_bnb) {
118+
assert(result_bnb->GetChange(coin_params.m_cost_of_change, CAmount{0}) == 0);
118119
assert(result_bnb->GetSelectedValue() >= target);
119120
(void)result_bnb->GetShuffledInputVector();
120121
(void)result_bnb->GetInputSet();

0 commit comments

Comments
 (0)