2 suggestions
Optional improvements
[suggestion] · BnB and CoinGrinder return documentation still names std::nullopt
The newly attached Doxygen blocks expose pre-existing return descriptions that promise std::nullopt, although both functions return util::Result<SelectionResult> with an error on failure.
Location: src/wallet/coinselection.cpp:112 (head).
Details and suggested fix
Both @returns lines still describe an optional result, while the implementations return util::Error() or ErrorMaxWeightExceeded() when no selection is found. Update both descriptions to say they return a SelectionResult on success and an error otherwise, with the max-weight error when the unsuccessful search encountered candidates exceeding max_selection_weight. Avoid promising an explanatory message, since util::Error() can be empty, or saying no valid selection exists, since either search can stop at TOTAL_TRIES.
[suggestion] · read_all parameter documentation misidentifies its buffer
The rewritten buf documentation retains a pre-existing type mismatch and omits the required nonzero vector size; no current caller passing an empty vector was found.
Location: src/util/subprocess.h:449 (head).
Details and suggested fix
read_all takes std::vector<char>&, not Buffer, and initializes its first read limit from buf.size(). Reserving capacity alone is insufficient: after a zero-length read returns zero, the full-buffer branch doubles zero to zero and repeats. Describe buf as vector storage, such as Buffer::buf, that must be resized to a nonzero initial read size before calling. Existing call sites satisfy this through add_cap().