This commit is contained in:
jl777
2019-01-29 02:21:11 -11:00
parent 542e08db60
commit 3f5b87742b
2 changed files with 11 additions and 2 deletions

View File

@@ -484,7 +484,16 @@ UniValue sudoku_txidinfo(uint64_t txfee,struct CCcontract_info *cp,cJSON *params
{ {
UniValue result(UniValue::VOBJ); UniValue result(UniValue::VOBJ);
if ( params != 0 ) if ( params != 0 )
{
printf("params.(%s)\n",jprint(params,0)); printf("params.(%s)\n",jprint(params,0));
int32_t i,n = cJSON_GetArraySize();
for (i=0; i<n; i++)
{
item = jitem(params,i);
jprint(item,0);
}
printf("n.%d\n",n);
}
result.push_back(Pair("result","success")); result.push_back(Pair("result","success"));
result.push_back(Pair("name","sudoku")); result.push_back(Pair("name","sudoku"));
result.push_back(Pair("method","txidinfo")); result.push_back(Pair("method","txidinfo"));

View File

@@ -5385,13 +5385,13 @@ UniValue cclib(const UniValue& params, bool fHelp)
evalcode = atoi(params[1].get_str().c_str()); evalcode = atoi(params[1].get_str().c_str());
if ( evalcode < EVAL_FIRSTUSER || evalcode > EVAL_LASTUSER ) if ( evalcode < EVAL_FIRSTUSER || evalcode > EVAL_LASTUSER )
{ {
printf("evalcode.%d vs (%d, %d)\n",evalcode,EVAL_FIRSTUSER,EVAL_LASTUSER); //printf("evalcode.%d vs (%d, %d)\n",evalcode,EVAL_FIRSTUSER,EVAL_LASTUSER);
throw runtime_error("evalcode not between EVAL_FIRSTUSER and EVAL_LASTUSER\n"); throw runtime_error("evalcode not between EVAL_FIRSTUSER and EVAL_LASTUSER\n");
} }
if ( params.size() == 3 ) if ( params.size() == 3 )
{ {
jsonparams = cJSON_Parse(params[2].get_str().c_str()); jsonparams = cJSON_Parse(params[2].get_str().c_str());
printf("Parse.(%s) -> %p\n",params[2].get_str().c_str(),jsonparams); //printf("Parse.(%s) -> %p\n",params[2].get_str().c_str(),jsonparams);
} }
} }
cp = CCinit(&C,evalcode); cp = CCinit(&C,evalcode);