2 suggestions
Optional improvements
[suggestion] · New Doxygen blocks describe the wrong coin-selection return value
Converting these comments to Doxygen exposes the stale claim that SelectCoinsBnB and CoinGrinder return std::nullopt, although both return util::Result<SelectionResult>.
Location: src/wallet/coinselection.cpp:111 (head).
Details and suggested fix
Both @returns lines still say “or std::nullopt”. Insufficient funds instead returns util::Error(), and an empty best selection returns either ErrorMaxWeightExceeded() or util::Error(). Update both lines to describe a selection result or an error when no valid selection was found. This makes the newly enabled documentation match the existing failure contract.
[suggestion] · The read_all parameter documentation omits its nonempty-vector requirement
The rewritten read_all documentation retains a pre-existing wrong type and omits the nonzero size requirement; an empty vector loops indefinitely, though no current caller supplying one was found.
Location: src/util/subprocess.h:449 (head).
Details and suggested fix
The parameter is a std::vector<char>&, not a Buffer; callers pass Buffer::buf. Its initial size() supplies fill_sz. With an empty vector, a zero-length read returns zero, the “Buffer full” branch doubles zero to zero, and the loop makes no progress. Describe buf as vector storage that must already have size() > 0, rather than merely reserved capacity. That also explains the input half of @param[in,out].