Reorganize CC assets code

This commit is contained in:
jl777
2018-07-22 02:49:52 -11:00
parent 8c9f5d2b66
commit 44a9fd7c3b
13 changed files with 2363 additions and 962 deletions

View File

@@ -60,19 +60,19 @@ bool Eval::Dispatch(const CC *cond, const CTransaction &txTo, unsigned int nIn)
uint8_t ecode = cond->code[0];
std::vector<uint8_t> vparams(cond->code+1, cond->code+cond->codeLength);
if (ecode == EVAL_IMPORTPAYOUT) {
return ImportPayout(vparams, txTo, nIn);
switch ( ecode )
{
case EVAL_IMPORTPAYOUT:
return ImportPayout(vparams, txTo, nIn);
break;
case EVAL_IMPORTCOIN:
return ImportCoin(vparams, txTo, nIn);
break;
default:
return ProcessCCevals(ecode,this,vparams,txTo,nIn);
break;
}
if (ecode == EVAL_IMPORTCOIN) {
return ImportCoin(vparams, txTo, nIn);
}
if (ecode == EVAL_ASSETS) {
return ProcessAssets(this, vparams, txTo, nIn);
}
return Invalid("invalid-code");
}