]> Git Repo - VerusCoin.git/blobdiff - src/cc/eval.cpp
Support for identities, identity APIs and new signing model - breaking change with...
[VerusCoin.git] / src / cc / eval.cpp
index ec6c6b1e051a5c3d95585b514d9222c185596118..cc7b230ca1ab3d8f5955e2721f2a7c0bcefde87d 100644 (file)
@@ -34,9 +34,6 @@ extern pthread_mutex_t KOMODO_CC_mutex;
 
 bool RunCCEval(const CC *cond, const CTransaction &tx, unsigned int nIn)
 {
-    // DISABLE CRYPTO CONDITIONS FOR NOW
-    return false;
-
     EvalRef eval;
     pthread_mutex_lock(&KOMODO_CC_mutex);
     bool out = eval->Dispatch(cond, tx, nIn);
@@ -76,16 +73,39 @@ bool Eval::Dispatch(const CC *cond, const CTransaction &txTo, unsigned int nIn)
     std::vector<uint8_t> vparams(cond->code+1, cond->code+cond->codeLength);
     switch ( ecode )
     {
+        case EVAL_PBAASDEFINITION:
+        case EVAL_SERVICEREWARD:
+        case EVAL_EARNEDNOTARIZATION:
+        case EVAL_ACCEPTEDNOTARIZATION:
+        case EVAL_FINALIZENOTARIZATION:
+        case EVAL_RESERVE_OUTPUT:
+        case EVAL_RESERVE_EXCHANGE:
+        case EVAL_RESERVE_TRANSFER:
+        case EVAL_RESERVE_DEPOSIT:
+        case EVAL_CROSSCHAIN_EXPORT:
+        case EVAL_CROSSCHAIN_IMPORT:
+        case EVAL_CURRENCYSTATE:
+        //case EVAL_IDENTITY_PRIMARY:
+        //case EVAL_IDENTITY_REVOKE:
+        //case EVAL_IDENTITY_RECOVER:
+        //case EVAL_IDENTITY_COMMITMENT:
+        //case EVAL_IDENTITY_RESERVATION:
+            if (!chainActive.LastTip() || CConstVerusSolutionVector::activationHeight.ActiveVersion(chainActive.LastTip()->GetHeight() + 1) < CActivationHeight::SOLUTION_VERUSV3)
+            {
+                // if chain is not able to process this yet, don't drop through to do so
+                break;
+            }
+
+        case EVAL_STAKEGUARD:
+            return(ProcessCC(cp,this, vparams, txTo, nIn));
+            break;
+
         case EVAL_IMPORTPAYOUT:
-            return ImportPayout(vparams, txTo, nIn);
+            //return ImportPayout(vparams, txTo, nIn);
             break;
             
         case EVAL_IMPORTCOIN:
-            return ImportCoin(vparams, txTo, nIn);
-            break;
-            
-        default:
-            return(ProcessCC(cp,this, vparams, txTo, nIn));
+            //return ImportCoin(vparams, txTo, nIn);
             break;
     }
     return Invalid("invalid-code, dont forget to add EVAL_NEWCC to Eval::Dispatch");
@@ -191,7 +211,7 @@ bool Eval::GetNotarisationData(const uint256 notaryHash, NotarisationData &data)
     CTransaction notarisationTx;
     CBlockIndex block;
     if (!GetTxConfirmed(notaryHash, notarisationTx, block)) return false;
-    if (!CheckNotaryInputs(notarisationTx, block.nHeight, block.nTime)) return false;
+    if (!CheckNotaryInputs(notarisationTx, block.GetHeight(), block.nTime)) return false;
     if (!ParseNotarisationOpReturn(notarisationTx, data)) return false;
     return true;
 }
This page took 0.024316 seconds and 4 git commands to generate.