mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-16 08:22:46 +00:00
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 <murch@murch.one>
This commit is contained in:
parent
5ad79b2035
commit
cc33e45789
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user