test
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotaries,uint8_t notaryid,uint256 txhash,uint64_t voutmask,uint8_t numvouts,uint32_t *pvals,uint8_t numpvals);
|
||||
void komodo_init();
|
||||
int32_t komodo_notarizeddata(int32_t nHeight,uint256 *notarized_hashp,uint256 *notarized_desttxidp);
|
||||
char *komodo_issuemethod(char *method,char *params);
|
||||
char *komodo_issuemethod(char *method,char *params,uint16_t port);
|
||||
|
||||
int32_t NOTARIZED_HEIGHT,Num_nutxos;
|
||||
uint256 NOTARIZED_HASH,NOTARIZED_DESTTXID;
|
||||
|
||||
@@ -88,14 +88,14 @@ char *curl_post(CURL **cHandlep,char *url,char *userpass,char *postfields,char *
|
||||
return(chunk.memory);
|
||||
}
|
||||
|
||||
char *komodo_issuemethod(char *method,char *params)
|
||||
char *komodo_issuemethod(char *method,char *params,uint16_t port)
|
||||
{
|
||||
static void *cHandle; char url[512],*retstr=0,postdata[8192];
|
||||
if ( params == 0 || params[0] == 0 )
|
||||
params = (char *)"[]";
|
||||
if ( strlen(params) < sizeof(postdata)-128 )
|
||||
{
|
||||
sprintf(url,(char *)"http://127.0.0.1:%u",BITCOIND_PORT);
|
||||
sprintf(url,(char *)"http://127.0.0.1:%u",port);
|
||||
sprintf(postdata,"{\"method\":\"%s\",\"params\":%s}",method,params);
|
||||
printf("postdata.(%s) USERPASS.(%s)\n",postdata,USERPASS);
|
||||
retstr = curl_post(&cHandle,url,USERPASS,postdata,0,0,0,0);
|
||||
|
||||
Reference in New Issue
Block a user