diff options
author | Jorge Timón <jtimon@jtimon.cc> | 2016-07-16 20:57:42 +0200 |
---|---|---|
committer | Jorge Timón <jtimon@jtimon.cc> | 2016-07-29 00:48:20 +0200 |
commit | a6cc299541fc9df5af010ce63eb1dd34d8c4b6e2 (patch) | |
tree | f52ef4c884de78f70d3bd008dfd5fb58521870f0 /src/main.h | |
parent | 304eff3c614aa18f4d5d5d367024b0dbbb4dce4e (diff) |
Mempool: Use Consensus::CheckTxInputs direclty over main::CheckInputs
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main.h b/src/main.h index 7ea570d859..b60bb05e18 100644 --- a/src/main.h +++ b/src/main.h @@ -351,9 +351,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. |