Review report

core: PR #36255

1 suggestion

Optional improvements

Link

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

The migrated CoinGrinder insufficient-funds cases would accept a non-empty error without the maximum-weight message, losing an assertion from the original test.

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

Details and suggested fix

Both "Empty UTXO pool" and "Insufficient funds" call TestCGFail with expect_max_weight_exceeded=false. The helper checks failure and the absence of the maximum-weight substring, so any other non-empty error would satisfy its assertions. The removed test explicitly required util::ErrorString(res).empty(), and CoinGrinder still returns an empty error for these inputs. Add BOOST_CHECK(util::ErrorString(result).empty()) when expect_max_weight_exceeded is false to restore that guarantee while leaving the maximum-weight expectations unchanged.


Coverage details