This commit is contained in:
jl777
2019-02-20 23:05:58 -11:00
parent c2def52cb2
commit 2496f79e41
3 changed files with 43 additions and 41 deletions

View File

@@ -5396,7 +5396,7 @@ UniValue cclibinfo(const UniValue& params, bool fHelp)
UniValue cclib(const UniValue& params, bool fHelp)
{
struct CCcontract_info *cp,C; char *method; cJSON *jsonparams=0; uint8_t evalcode = EVAL_FIRSTUSER;
struct CCcontract_info *cp,C; char *method,*jsonstr=0; uint8_t evalcode = EVAL_FIRSTUSER;
if ( fHelp || params.size() > 3 )
throw runtime_error("cclib method [evalcode] [JSON params]\n");
if ( ASSETCHAINS_CCLIB.size() == 0 )
@@ -5417,11 +5417,11 @@ UniValue cclib(const UniValue& params, bool fHelp)
if ( params.size() == 3 )
{
//fprintf(stderr,"params.(%s %s %s)\n",params[0].get_str().c_str(),params[1].get_str().c_str(),params[2].get_str().c_str());
jsonparams = cJSON_Parse(params[2].get_str().c_str());
jsonparams = params[2].get_str().c_str();
}
}
cp = CCinit(&C,evalcode);
return(CClib(cp,method,jsonparams));
return(CClib(cp,method,jsonstr));
}
UniValue oraclesaddress(const UniValue& params, bool fHelp)