Skip to content

Commit a3543af

Browse files
committed
Better document CheckInputs parameter meanings
1 parent 309ee1a commit a3543af

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/validation.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,8 +1223,15 @@ void InitScriptExecutionCache() {
12231223

12241224
/**
12251225
* Check whether all inputs of this transaction are valid (no double spends, scripts & sigs, amounts)
1226-
* This does not modify the UTXO set. If pvChecks is not NULL, script checks are pushed onto it
1227-
* instead of being performed inline.
1226+
* This does not modify the UTXO set.
1227+
*
1228+
* If pvChecks is not NULL, script checks are pushed onto it instead of being performed inline. Any
1229+
* script checks which are not necessary (eg due to script execution cache hits) are, obviously,
1230+
* not pushed onto pvChecks/run.
1231+
*
1232+
* Setting cacheSigStore/cacheFullScriptStore to false will remove elements from the corresponding cache
1233+
* which are matched. This is useful for checking blocks where we will likely never need the cache
1234+
* entry again.
12281235
*/
12291236
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)
12301237
{

0 commit comments

Comments
 (0)