aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/test/fuzz
diff options
context:
space:
mode:
authorS3RK <1466284+S3RK@users.noreply.github.com>2022-07-06 09:03:01 +0200
committerS3RK <1466284+S3RK@users.noreply.github.com>2022-08-15 09:35:20 +0200
commit4fef5344288e454460b80db0316294e1ec1ad8ad (patch)
tree4447dc2f7a1bf4718c55cc082e2d0ee52cfaae91 /src/wallet/test/fuzz
parent87e0ef903133492e76b7c7556209554d4a0c3d66 (diff)
downloadbitcoin-4fef5344288e454460b80db0316294e1ec1ad8ad.tar.xz
wallet: use GetChange() when computing waste
Diffstat (limited to 'src/wallet/test/fuzz')
-rw-r--r--src/wallet/test/fuzz/coinselection.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/test/fuzz/coinselection.cpp b/src/wallet/test/fuzz/coinselection.cpp
index 52bd74126d..90a328179e 100644
--- a/src/wallet/test/fuzz/coinselection.cpp
+++ b/src/wallet/test/fuzz/coinselection.cpp
@@ -85,11 +85,11 @@ FUZZ_TARGET(coinselection)
const auto result_bnb = SelectCoinsBnB(group_pos, target, cost_of_change);
auto result_srd = SelectCoinsSRD(group_pos, target, fast_random_context);
- if (result_srd) result_srd->ComputeAndSetWaste(cost_of_change);
+ if (result_srd) result_srd->ComputeAndSetWaste(cost_of_change, cost_of_change, 0);
CAmount change_target{GenerateChangeTarget(target, coin_params.m_change_fee, fast_random_context)};
auto result_knapsack = KnapsackSolver(group_all, target, change_target, fast_random_context);
- if (result_knapsack) result_knapsack->ComputeAndSetWaste(cost_of_change);
+ if (result_knapsack) result_knapsack->ComputeAndSetWaste(cost_of_change, cost_of_change, 0);
// If the total balance is sufficient for the target and we are not using
// effective values, Knapsack should always find a solution.