corr check for non-existing eval

in CCLogPrintStream -debug=cat-0 added

declr corrected

comment added to check for non supported eval

added check if eval not supported

СCLogPrintStream moved to CCutils.cpp
This commit is contained in:
dimxy
2019-02-12 13:07:31 +05:00
parent 00d27436f3
commit 9eed81089b
4 changed files with 13 additions and 8 deletions

View File

@@ -687,6 +687,9 @@ bool ProcessCC(struct CCcontract_info *cp,Eval* eval, std::vector<uint8_t> param
from_mempool = 1;
height &= ((1<<30) - 1);
}
if (cp->validate == NULL)
return eval->Invalid("validation not supported for eval code");
//fprintf(stderr,"KOMODO_CONNECTING.%d mempool.%d vs CCactive.%d\n",height,from_mempool,KOMODO_CCACTIVATE);
// there is a chance CC tx is valid in mempool, but invalid when in block, so we cant filter duplicate requests. if any of the vins are spent, for example
//txid = ctx.GetHash();
@@ -748,4 +751,4 @@ bool CClib_Dispatch(const CC *cond,Eval *eval,std::vector<uint8_t> paramsNull,co
return(false); //eval->Invalid("error in CClib_validate");
}
return eval->Invalid("cclib CC must have evalcode between 16 and 127");
}
}