From cc33e4578946c68d6d333f35c48f8cbf3f75f6cf Mon Sep 17 00:00:00 2001 From: yancy Date: Wed, 23 Jul 2025 19:43:32 -0500 Subject: [PATCH] test: improve assertion for SRD max weight test Previously, the assertion only showed that a result was found, however made no assertion about the quality of the result. Remove comment about what UTXOs are selected and what are not since the test does not reflect that. Co-authored-by: Mark "Murch" Erhardt --- src/wallet/test/coinselector_tests.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wallet/test/coinselector_tests.cpp b/src/wallet/test/coinselector_tests.cpp index 49241f33554..2398d578be3 100644 --- a/src/wallet/test/coinselector_tests.cpp +++ b/src/wallet/test/coinselector_tests.cpp @@ -1223,7 +1223,7 @@ BOOST_AUTO_TEST_CASE(srd_tests) { // ################################################################################################################ - // 3) Test selection when some coins surpass the max allowed weight while others not. --> must find a good solution + // 3) Test that SRD result does not exceed the max weight // ################################################################################################################ CAmount target = 25.33L * COIN; int max_selection_weight = 10000; // WU @@ -1238,6 +1238,7 @@ BOOST_AUTO_TEST_CASE(srd_tests) return available_coins; }); BOOST_CHECK(res); + BOOST_CHECK(res->GetWeight() <= max_selection_weight); } }