]> Git Repo - VerusCoin.git/commitdiff
Correct consensus logic in ContextualCheckInputs
authorJack Grigg <[email protected]>
Thu, 18 May 2017 01:21:00 +0000 (13:21 +1200)
committerJack Grigg <[email protected]>
Fri, 16 Jun 2017 01:45:19 +0000 (13:45 +1200)
Closes #2385.

src/main.cpp

index a3de5e6d7b7d7eb437e9daac8d0f3234643093d2..6d8acde0c38ebbf8a887c4dca65e818fd042fbaa 100644 (file)
@@ -1687,11 +1687,12 @@ bool CheckTxInputs(const CTransaction& tx, CValidationState& state, const CCoins
 
 bool ContextualCheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsViewCache &inputs, bool fScriptChecks, unsigned int flags, bool cacheStore, const Consensus::Params& consensusParams, std::vector<CScriptCheck> *pvChecks)
 {
-    if (!Consensus::CheckTxInputs(tx, state, inputs, GetSpendHeight(inputs), consensusParams))
-        return false;
-
     if (!tx.IsCoinBase())
     {
+        if (!Consensus::CheckTxInputs(tx, state, inputs, GetSpendHeight(inputs), consensusParams)) {
+            return false;
+        }
+
         if (pvChecks)
             pvChecks->reserve(tx.vin.size());
 
This page took 0.032131 seconds and 4 git commands to generate.