aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2017-06-07 11:05:34 -0400
committerMatt Corallo <git@bluematt.me>2017-06-22 12:21:09 -0400
commita3543af3cc878f2f24ada8b80198c8e4572c06eb (patch)
tree70a84ffbcba3b6fd4f091cd088085d4823e37da4 /src
parent309ee1ae7b288deabe6601b054474393f31e1fe7 (diff)
Better document CheckInputs parameter meanings
Diffstat (limited to 'src')
-rw-r--r--src/validation.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index baddb84be6..945d39876c 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -1223,8 +1223,15 @@ void InitScriptExecutionCache() {
/**
* 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 NULL, script checks are pushed onto it
- * instead of being performed inline.
+ * This does not modify the UTXO set.
+ *
+ * If pvChecks is not NULL, 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 cacheSigStore/cacheFullScriptStore 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.
*/
static bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsViewCache &inputs, bool fScriptChecks, unsigned int flags, bool cacheSigStore, bool cacheFullScriptStore, PrecomputedTransactionData& txdata, std::vector<CScriptCheck> *pvChecks)
{