Test
This commit is contained in:
@@ -63,6 +63,7 @@ UniValue CClib_method(struct CCcontract_info *cp,char *method,cJSON *params)
|
||||
UniValue result(UniValue::VOBJ); uint64_t txfee = 10000;
|
||||
if ( cp->evalcode == EVAL_SUDOKU )
|
||||
{
|
||||
printf("CClib_method params.%p\n",params);
|
||||
if ( strcmp(method,"txidinfo") == 0 )
|
||||
return(sudoku_txidinfo(txfee,cp,params));
|
||||
else if ( strcmp(method,"gen") == 0 )
|
||||
@@ -119,6 +120,7 @@ UniValue CClib_info(struct CCcontract_info *cp)
|
||||
UniValue CClib(struct CCcontract_info *cp,char *method,cJSON *params)
|
||||
{
|
||||
UniValue result(UniValue::VOBJ); int32_t i; std::string rawtx;
|
||||
printf("CClib params.%p\n",params);
|
||||
for (i=0; i<sizeof(CClib_methods)/sizeof(*CClib_methods); i++)
|
||||
{
|
||||
if ( cp->evalcode == CClib_methods[i].evalcode && strcmp(method,CClib_methods[i].method) == 0 )
|
||||
|
||||
@@ -498,7 +498,7 @@ UniValue sudoku_generate(uint64_t txfee,struct CCcontract_info *cp,cJSON *params
|
||||
UniValue result(UniValue::VOBJ); CPubKey sudokupk,pk; uint8_t privkey[32],unsolved[9][9],pub33[33]; uint32_t srandi; uint256 hash; char coinaddr[64]; uint64_t inputsum,amount,change=0; std::string rawtx;
|
||||
if ( params != 0 )
|
||||
{
|
||||
printf("params.(%s)\n",jprint(params,0));
|
||||
printf("%p params.(%s)\n",params,jprint(params,0));
|
||||
amount = jdouble(jitem(params,0),0) * COIN + 0.0000000049;
|
||||
} else amount = COIN;
|
||||
result.push_back(Pair("result","success"));
|
||||
|
||||
Reference in New Issue
Block a user