aboutsummaryrefslogtreecommitdiff
path: root/src/consensus
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2021-05-25 21:09:09 +0000
committerpracticalswift <practicalswift@users.noreply.github.com>2021-05-25 21:09:05 +0000
commit37371268d14ed6d5739af5b65d8bdb38b0e8dda2 (patch)
treeff4b78f566cfba60187b7467c475b9000880f9f1 /src/consensus
parent860093401840d7aad7b439aeba0d1598933bc9c6 (diff)
downloadbitcoin-37371268d14ed6d5739af5b65d8bdb38b0e8dda2.tar.xz
Mark `CheckTxInputs` `[[nodiscard]]` (out-param `txfee` only set if call is successful). Avoid UUM in fuzzing harness `coins_view`.
Diffstat (limited to 'src/consensus')
-rw-r--r--src/consensus/tx_verify.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/consensus/tx_verify.h b/src/consensus/tx_verify.h
index e78dc9f2a5..d5fd43e131 100644
--- a/src/consensus/tx_verify.h
+++ b/src/consensus/tx_verify.h
@@ -24,7 +24,7 @@ namespace Consensus {
* @param[out] txfee Set to the transaction fee if successful.
* Preconditions: tx.IsCoinBase() is false.
*/
-bool CheckTxInputs(const CTransaction& tx, TxValidationState& state, const CCoinsViewCache& inputs, int nSpendHeight, CAmount& txfee);
+[[nodiscard]] bool CheckTxInputs(const CTransaction& tx, TxValidationState& state, const CCoinsViewCache& inputs, int nSpendHeight, CAmount& txfee);
} // namespace Consensus
/** Auxiliary functions for transaction validation (ideally should not be exposed) */