1 suggestion
Optional improvements
[suggestion] · Insufficient-funds tests no longer require an empty error
The migrated CoinGrinder tests would accept any non-empty error for insufficient funds, although CoinGrinder currently returns an empty error on plain failure paths.
Location: src/wallet/test/coinselection_tests.cpp:275 (head).
Details and suggested fix
The removed tests asserted that insufficient funds returned an empty error. TestCGFail now checks only whether the error contains the maximum-weight message, so the “Empty UTXO pool” and “Insufficient funds” cases would pass if CoinGrinder returned another non-empty error. CoinGrinder currently returns an empty error on both plain-failure paths. When expect_max_weight_exceeded is false, also check that util::ErrorString(result).empty(). The same weaker check appears in TestBnBFail and TestSRDFail, where the guarantee could also be preserved for consistency.