|
|
@ -401,6 +401,8 @@ int32_t electrum_kickstart(struct electrum_info *ep) |
|
|
|
return(0); |
|
|
|
} |
|
|
|
|
|
|
|
int32_t zeroval(); |
|
|
|
|
|
|
|
cJSON *electrum_submit(char *symbol,struct electrum_info *ep,cJSON **retjsonp,char *method,char *params,int32_t timeout) |
|
|
|
{ |
|
|
|
// queue id and string and callback
|
|
|
@ -418,6 +420,8 @@ cJSON *electrum_submit(char *symbol,struct electrum_info *ep,cJSON **retjsonp,ch |
|
|
|
*retjsonp = 0; |
|
|
|
sprintf(stratumreq,"{ \"jsonrpc\":\"2.0\", \"id\": %u, \"method\":\"%s\", \"params\": %s }\n",ep->stratumid,method,params); |
|
|
|
printf("%s %s",symbol,stratumreq); |
|
|
|
if ( strcmp(params,"[\"KMD\"]") == 0 ) |
|
|
|
printf("div0 %d\n",1/zeroval()); |
|
|
|
memset(ep->buf,0,ep->bufsize); |
|
|
|
sitem = electrum_sitem(ep,stratumreq,timeout,retjsonp); |
|
|
|
portable_mutex_lock(&ep->mutex); // this helps performance!
|
|
|
|