Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show First 20 Lines • Show All 481 Lines • ▼ Show 20 Lines | |||||
* or serial validation. With pvChecks null (serial validation), breaking the | * or serial validation. With pvChecks null (serial validation), breaking the | ||||
* pLimitSigChecks limit will abort evaluation early and return false. With | * pLimitSigChecks limit will abort evaluation early and return false. With | ||||
* pvChecks not-null (parallel validation): the cached nSigChecks may itself | * pvChecks not-null (parallel validation): the cached nSigChecks may itself | ||||
* break the limit in which case false is returned, OR, each entry in the | * break the limit in which case false is returned, OR, each entry in the | ||||
* returned pvChecks must be executed exactly once in order to probe the limit | * returned pvChecks must be executed exactly once in order to probe the limit | ||||
* accurately. | * accurately. | ||||
*/ | */ | ||||
bool CheckInputs(const CTransaction &tx, TxValidationState &state, | bool CheckInputs(const CTransaction &tx, TxValidationState &state, | ||||
const CCoinsViewCache &view, bool fScriptChecks, | const CCoinsViewCache &view, const uint32_t flags, | ||||
const uint32_t flags, bool sigCacheStore, | bool sigCacheStore, bool scriptCacheStore, | ||||
bool scriptCacheStore, | |||||
const PrecomputedTransactionData &txdata, int &nSigChecksOut, | const PrecomputedTransactionData &txdata, int &nSigChecksOut, | ||||
TxSigCheckLimiter &txLimitSigChecks, | TxSigCheckLimiter &txLimitSigChecks, | ||||
CheckInputsLimiter *pBlockLimitSigChecks, | CheckInputsLimiter *pBlockLimitSigChecks, | ||||
std::vector<CScriptCheck> *pvChecks) | std::vector<CScriptCheck> *pvChecks) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
/** | /** | ||||
* Handy shortcut to full fledged CheckInputs call. | * Handy shortcut to full fledged CheckInputs call. | ||||
*/ | */ | ||||
static inline bool | static inline bool | ||||
CheckInputs(const CTransaction &tx, TxValidationState &state, | CheckInputs(const CTransaction &tx, TxValidationState &state, | ||||
const CCoinsViewCache &view, bool fScriptChecks, | const CCoinsViewCache &view, const uint32_t flags, | ||||
const uint32_t flags, bool sigCacheStore, bool scriptCacheStore, | bool sigCacheStore, bool scriptCacheStore, | ||||
const PrecomputedTransactionData &txdata, int &nSigChecksOut) | const PrecomputedTransactionData &txdata, int &nSigChecksOut) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main) { | EXCLUSIVE_LOCKS_REQUIRED(cs_main) { | ||||
TxSigCheckLimiter nSigChecksTxLimiter; | TxSigCheckLimiter nSigChecksTxLimiter; | ||||
return CheckInputs(tx, state, view, fScriptChecks, flags, sigCacheStore, | return CheckInputs(tx, state, view, flags, sigCacheStore, scriptCacheStore, | ||||
scriptCacheStore, txdata, nSigChecksOut, | txdata, nSigChecksOut, nSigChecksTxLimiter, nullptr, | ||||
nSigChecksTxLimiter, nullptr, nullptr); | nullptr); | ||||
} | } | ||||
/** Get the BIP9 state for a given deployment at the current tip. */ | /** Get the BIP9 state for a given deployment at the current tip. */ | ||||
ThresholdState VersionBitsTipState(const Consensus::Params ¶ms, | ThresholdState VersionBitsTipState(const Consensus::Params ¶ms, | ||||
Consensus::DeploymentPos pos); | Consensus::DeploymentPos pos); | ||||
/** Get the BIP9 state for a given deployment at a given block. */ | /** Get the BIP9 state for a given deployment at a given block. */ | ||||
ThresholdState VersionBitsBlockState(const Consensus::Params ¶ms, | ThresholdState VersionBitsBlockState(const Consensus::Params ¶ms, | ||||
▲ Show 20 Lines • Show All 536 Lines • Show Last 20 Lines |