1222 | @@ -1223,7 +1223,7 @@ BOOST_AUTO_TEST_CASE(srd_tests)
1223 |
1224 | {
1225 | // ################################################################################################################
1226 | - // 3) Test selection when some coins surpass the max allowed weight while others not. --> must find a good solution
1227 | + // 3) Test that when the max weight is exceeded, only the most valuable encountered UTXOs are returned
What SRD does is a bit different:
// 3) Test that SRD result does not exceed the max weight
Is it not true that when the max weight is encountered, the least valuable utxo is removed from the selection via the min-heap? Therefore the most valuable are returned?
The phrasing "Test that when the max weight is exceeded, only the most valuable encountered UTXOs are returned" sounds potentially misleading to me, because it could be understood as the algorithm changing to largest-first if the max weight is exceeded or the input set getting pruned beyond dropping below the weight limit, but this only tests that a solution is found that stays within the limit.
Well since I see you changed the assertion, then I think your rewording also makes sense.