Review report

core: PR #36255

1 suggestion

Optional improvements

Link

[suggestion] · Migrated insufficient-funds tests lose the empty-error check

The migrated CoinGrinder insufficient-funds tests would accept unrelated non-empty errors, losing the explicit empty-error assertion in the removed test.

Location: src/wallet/test/coinselection_tests.cpp:275 (head).

Details and suggested fix

TestCGFail checks failure and whether the error contains the maximum-weight message. Both insufficient-funds cases use the default expect_max_weight_exceeded=false, so any other non-empty error would satisfy both assertions. The removed populated-pool test explicitly required util::ErrorString(res).empty(). Both new fixtures reach the early insufficient-funds return, which currently returns an empty error. Add BOOST_CHECK(util::ErrorString(result).empty()) when expect_max_weight_exceeded is false, while retaining the maximum-weight check for callers passing true. This restores the regression coverage without changing the expected behavior.


Coverage details