Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show First 20 Lines • Show All 421 Lines • ▼ Show 20 Lines | |||||
* @param[in] inputs Map of previous transactions that have outputs we're | * @param[in] inputs Map of previous transactions that have outputs we're | ||||
* spending | * spending | ||||
* @param[out] flags Script verification flags | * @param[out] flags Script verification flags | ||||
* @return Total signature operation cost of tx | * @return Total signature operation cost of tx | ||||
*/ | */ | ||||
uint64_t GetTransactionSigOpCount(const CTransaction &tx, | uint64_t GetTransactionSigOpCount(const CTransaction &tx, | ||||
const CCoinsViewCache &inputs, int flags); | const CCoinsViewCache &inputs, int flags); | ||||
/** | |||||
* Check whether all inputs of this transaction are valid (no double spends, | |||||
* scripts & sigs, amounts). This does not modify the UTXO set. | |||||
* | |||||
* If pvChecks is not nullptr, script checks are pushed onto it instead of being | |||||
* performed inline. Any script checks which are not necessary (eg due to script | |||||
* execution cache hits) are, obviously, not pushed onto pvChecks/run. | |||||
* | |||||
* Setting sigCacheStore/scriptCacheStore to false will remove elements from the | |||||
* corresponding cache which are matched. This is useful for checking blocks | |||||
* where we will likely never need the cache entry again. | |||||
*/ | |||||
bool CheckInputs(const CTransaction &tx, CValidationState &state, | |||||
const CCoinsViewCache &view, bool fScriptChecks, | |||||
uint32_t flags, bool sigCacheStore, bool scriptCacheStore, | |||||
const PrecomputedTransactionData &txdata, | |||||
std::vector<CScriptCheck> *pvChecks = nullptr); | |||||
/** Apply the effects of this transaction on the UTXO set represented by view */ | /** Apply the effects of this transaction on the UTXO set represented by view */ | ||||
void UpdateCoins(const CTransaction &tx, CCoinsViewCache &inputs, int nHeight); | void UpdateCoins(const CTransaction &tx, CCoinsViewCache &inputs, int nHeight); | ||||
void UpdateCoins(const CTransaction &tx, CCoinsViewCache &inputs, | void UpdateCoins(const CTransaction &tx, CCoinsViewCache &inputs, | ||||
CTxUndo &txundo, int nHeight); | CTxUndo &txundo, int nHeight); | ||||
/** Transaction validation functions */ | /** Transaction validation functions */ | ||||
/** Context-independent validity checks for coinbase and non-coinbase | /** Context-independent validity checks for coinbase and non-coinbase | ||||
▲ Show 20 Lines • Show All 231 Lines • Show Last 20 Lines |