Mempool: Use Consensus::CheckTxInputs direclty over main::CheckInputs
This commit is contained in:
17
src/main.h
17
src/main.h
@@ -339,6 +339,8 @@ bool ContextualCheckTransaction(const CTransaction& tx, CValidationState &state,
|
||||
/** 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, libzcash::ProofVerifier& verifier);
|
||||
bool CheckTransactionWithoutProofVerification(const CTransaction& tx, CValidationState &state);
|
||||
@@ -348,6 +350,17 @@ bool CheckTransactionWithoutProofVerification(const CTransaction& tx, CValidatio
|
||||
*/
|
||||
bool IsStandardTx(const CTransaction& tx, std::string& reason, int nHeight = 0);
|
||||
|
||||
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, const Consensus::Params& consensusParams);
|
||||
|
||||
} // namespace Consensus
|
||||
|
||||
/**
|
||||
* Check if transaction is final and can be included in a block with the
|
||||
* specified height and time. Consensus critical.
|
||||
@@ -536,10 +549,6 @@ extern CBlockTreeDB *pblocktree;
|
||||
*/
|
||||
int GetSpendHeight(const CCoinsViewCache& inputs);
|
||||
|
||||
namespace Consensus {
|
||||
bool CheckTxInputs(const CTransaction& tx, CValidationState& state, const CCoinsViewCache& inputs, int nSpendHeight, const Consensus::Params& consensusParams);
|
||||
}
|
||||
|
||||
/** Return a CMutableTransaction with contextual default values based on set of consensus rules at height */
|
||||
CMutableTransaction CreateNewContextualCMutableTransaction(const Consensus::Params& consensusParams, int nHeight);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user