doc: fix incorrect @param annotations
What changed, and why it matters
This commit only fixes documentation comments that describe whether function parameters are inputs, outputs, or both. No actual code logic was changed, so it cannot affect program behavior or introduce a security vulnerability.
No security action needed. Treat as a normal documentation cleanup commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit corrects Doxygen-style @param annotations across seven files. Changes include switching @peer to @param, correcting [in] vs [out] vs [in,out] direction tags, and fixing a parameter name typo (psbt -> psbtx). The diff contains no executable code changes.
Changed components
src/kernel/bitcoinkernel.hsrc/net_processing.cppsrc/psbt.hsrc/qt/bitcoingui.hsrc/qt/sendcoinsdialog.hsrc/wallet/coinselection.cppsrc/wallet/wallet.hInspect captured patch +17 / −17
### src/kernel/bitcoinkernel.h
@@ -2098,7 +2098,7 @@ BITCOINKERNEL_API btck_BlockHash* BITCOINKERNEL_WARN_UNUSED_RESULT btck_block_ha
* @brief Serializes the block hash to bytes.
*
* @param[in] block_hash Non-null.
- * @param[in] output The serialized block hash.
+ * @param[out] output The serialized block hash.
*/
BITCOINKERNEL_API void btck_block_hash_to_bytes(
const btck_BlockHash* block_hash, unsigned char output[32]) BITCOINKERNEL_ARG_NONNULL(1, 2);
### src/net_processing.cpp
@@ -714,7 +714,7 @@ class PeerManagerImpl final : public PeerManager
/**
* Reconsider orphan transactions after a parent has been accepted to the mempool.
*
- * @peer[in] peer The peer whose orphan transactions we will reconsider. At most
+ * @param[in] peer The peer whose orphan transactions we will reconsider. At most
* one orphan will be reconsidered on each call of this function. If an
* accepted orphan has orphaned children, those will need to be
* reconsidered, creating more work, possibly for other peers.
### src/psbt.h
@@ -1666,8 +1666,8 @@ bool FinalizePSBT(PartiallySignedTransaction& psbtx);
/**
* Finalizes a PSBT if possible, and extracts it to a CMutableTransaction if it could be finalized.
*
- * @param[in] psbtx PartiallySignedTransaction
- * @param[out] result CMutableTransaction representing the complete transaction, if successful
+ * @param[in,out] psbtx PartiallySignedTransaction
+ * @param[out] result CMutableTransaction representing the complete transaction, if successful
* @return True if we successfully extracted the transaction, false otherwise
*/
bool FinalizeAndExtractPSBT(PartiallySignedTransaction& psbtx, CMutableTransaction& result);
### src/qt/bitcoingui.h
@@ -240,7 +240,7 @@ public Q_SLOTS:
@param[in] message the displayed text
@param[in] style modality and style definitions (icon and used buttons - buttons only for message boxes)
@see CClientUIInterface::MessageBoxFlags
- @param[in] ret pointer to a bool that will be modified to whether Ok was clicked (modal only)
+ @param[out] ret pointer to a bool that will be modified to whether Ok was clicked (modal only)
@param[in] detailed_message the text to be displayed in the details area
*/
void message(const QString& title, QString message, unsigned int style, bool* ret = nullptr, const QString& detailed_message = QString());
### src/qt/sendcoinsdialog.h
@@ -86,12 +86,12 @@ public Q_SLOTS:
/* Sign PSBT using external signer.
*
* @param[in,out] psbtx the PSBT to sign
- * @param[in,out] mtx needed to attempt to finalize
- * @param[in,out] complete whether the PSBT is complete (a successfully signed multisig transaction may not be complete)
+ * @param[out] mtx needed to attempt to finalize
+ * @param[out] complete whether the PSBT is complete (a successfully signed multisig transaction may not be complete)
*
* @returns false if any failure occurred, which may include the user rejection of a transaction on the device.
*/
- bool signWithExternalSigner(PartiallySignedTransaction& psbt, CMutableTransaction& mtx, bool& complete);
+ bool signWithExternalSigner(PartiallySignedTransaction& psbtx, CMutableTransaction& mtx, bool& complete);
void updateFeeMinimizedLabel();
void updateCoinControlState();
### src/wallet/coinselection.cpp
@@ -99,14 +99,14 @@ struct {
* The Branch and Bound algorithm is described in detail in Murch's Master Thesis:
* https://murch.one/wp-content/uploads/2016/11/erhardt2016coinselection.pdf
*
- * @param const std::vector<OutputGroup>& utxo_pool The set of UTXO groups that we are choosing from.
+ * @param[in,out] utxo_pool The set of UTXO groups that we are choosing from.
* These UTXO groups will be sorted in descending order by effective value and the OutputGroups'
* values are their effective values.
- * @param const CAmount& selection_target This is the value that we want to select. It is the lower
+ * @param[in] selection_target This is the value that we want to select. It is the lower
* bound of the range.
- * @param const CAmount& cost_of_change This is the cost of creating and spending a change output.
+ * @param[in] cost_of_change This is the cost of creating and spending a change output.
* This plus selection_target is the upper bound of the range.
- * @param int max_selection_weight The maximum allowed weight for a selection result to be valid.
+ * @param[in] max_selection_weight The maximum allowed weight for a selection result to be valid.
* @returns The result of this coin selection algorithm, or std::nullopt
*/
@@ -388,12 +388,12 @@ util::Result<SelectionResult> SelectCoinsBnB(std::vector<OutputGroup>& utxo_pool
* branch can be skipped, or both the inclusion and omission branch can be skipped after evaluating the candidate input
* set in the node.
*
- * @param std::vector<OutputGroup>& utxo_pool The UTXOs that we are choosing from. These UTXOs will be sorted in
+ * @param[in,out] utxo_pool The UTXOs that we are choosing from. These UTXOs will be sorted in
* descending order by effective value, with lower weight preferred as a tie-breaker. (We can think of an output
* group with multiple as a heavier UTXO with the combined amount here.)
- * @param const CAmount& selection_target This is the minimum amount that we need for the transaction without considering change.
- * @param const CAmount& change_target The minimum budget for creating a change output, by which we increase the selection_target.
- * @param int max_selection_weight The maximum allowed weight for a selection result to be valid.
+ * @param[in] selection_target This is the minimum amount that we need for the transaction without considering change.
+ * @param[in] change_target The minimum budget for creating a change output, by which we increase the selection_target.
+ * @param[in] max_selection_weight The maximum allowed weight for a selection result to be valid.
* @returns The result of this coin selection algorithm, or std::nullopt
*/
util::Result<SelectionResult> CoinGrinder(std::vector<OutputGroup>& utxo_pool, const CAmount& selection_target, CAmount change_target, int max_selection_weight)
### src/wallet/wallet.h
@@ -651,7 +651,7 @@ class CWallet final : public WalletStorage, public interfaces::Chain::Notificati
* Sets `complete` if the PSBT is now complete (i.e. has all required
* signatures or signature-parts, and is ready to finalize.)
*
- * @param[in] psbtx PartiallySignedTransaction to fill in
+ * @param[in,out] psbtx PartiallySignedTransaction to fill in
* @param[in] options options for filling or signing
* @param[out] complete indicates whether the PSBT is now complete
* @param[out] n_signed the number of inputs signed by this walletWhy this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.