Skip to content

Commit cc33e45

Browse files
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 <[email protected]>
1 parent 5ad79b2 commit cc33e45

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/wallet/test/coinselector_tests.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,7 @@ BOOST_AUTO_TEST_CASE(srd_tests)
12231223

12241224
{
12251225
// ################################################################################################################
1226-
// 3) Test selection when some coins surpass the max allowed weight while others not. --> must find a good solution
1226+
// 3) Test that SRD result does not exceed the max weight
12271227
// ################################################################################################################
12281228
CAmount target = 25.33L * COIN;
12291229
int max_selection_weight = 10000; // WU
@@ -1238,6 +1238,7 @@ BOOST_AUTO_TEST_CASE(srd_tests)
12381238
return available_coins;
12391239
});
12401240
BOOST_CHECK(res);
1241+
BOOST_CHECK(res->GetWeight() <= max_selection_weight);
12411242
}
12421243
}
12431244

0 commit comments

Comments
 (0)