aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorbrunoerg <brunoely.gc@gmail.com>2023-08-04 16:22:17 -0300
committerbrunoerg <brunoely.gc@gmail.com>2023-08-23 14:48:27 -0300
commit6d9b26d56ab5295dfcfe0f80a3069046a263fb2f (patch)
tree196ba37eb8e9709dbf65711e1dbf97741e0cb14c /src/wallet
parentb2eb55840778515d61465acc8106b27e16af1c88 (diff)
fuzz: coinselection, BnB should never produce change
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/test/fuzz/coinselection.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wallet/test/fuzz/coinselection.cpp b/src/wallet/test/fuzz/coinselection.cpp
index 0c65835ec6..58d47acbc6 100644
--- a/src/wallet/test/fuzz/coinselection.cpp
+++ b/src/wallet/test/fuzz/coinselection.cpp
@@ -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();