Browse Source

Test

etomic
jl777 7 years ago
parent
commit
013d030f22
  1. 4
      iguana/exchanges/LP_socket.c
  2. 1
      iguana/exchanges/LP_utxo.c

4
iguana/exchanges/LP_socket.c

@ -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!

1
iguana/exchanges/LP_utxo.c

@ -427,6 +427,7 @@ struct LP_address *LP_address_utxo_reset(struct iguana_info *coin)
{
struct LP_address *ap; struct LP_address_utxo *up,*tmp; int32_t i,n,m,vout,height; cJSON *array,*item,*txobj; int64_t value; bits256 txid; uint32_t now;
LP_address(coin,coin->smartaddr);
printf("call listunspent issue %s (%s)\n",coin->symbol,coin->smartaddr);
LP_listunspent_issue(coin->symbol,coin->smartaddr,2);
if ( (ap= LP_addressfind(coin,coin->smartaddr)) == 0 )
{

Loading…
Cancel
Save