aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-08-01 00:05:02 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2016-08-01 00:09:14 +0200
commitf798b891bcecea9548eedacae70eeb9906c1ddbf (patch)
treecb888e5b25611578736e4c8a1a871b3228bdcd0a /src/main.h
parentcf2cecb18779ce83de9adebf382dff1c19b12840 (diff)
parenta6cc299541fc9df5af010ce63eb1dd34d8c4b6e2 (diff)
Merge #8346: Mempool: Use Consensus::CheckTxInputs direclty over main::CheckInputs
a6cc299 Mempool: Use Consensus::CheckTxInputs direclty over main::CheckInputs (Jorge Timón)
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main.h b/src/main.h
index 26ea6adc6b..7f337b80ba 100644
--- a/src/main.h
+++ b/src/main.h
@@ -352,9 +352,22 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
/** Apply the effects of this transaction on the UTXO set represented by view */
void UpdateCoins(const CTransaction& tx, CCoinsViewCache& inputs, int nHeight);
+/** Transaction validation functions */
+
/** Context-independent validity checks */
bool CheckTransaction(const CTransaction& tx, CValidationState& state);
+namespace Consensus {
+
+/**
+ * Check whether all inputs of this transaction are valid (no double spends and amounts)
+ * This does not modify the UTXO set. This does not check scripts and sigs.
+ * Preconditions: tx.IsCoinBase() is false.
+ */
+bool CheckTxInputs(const CTransaction& tx, CValidationState& state, const CCoinsViewCache& inputs, int nSpendHeight);
+
+} // namespace Consensus
+
/**
* Check if transaction is final and can be included in a block with the
* specified height and time. Consensus critical.