Browse Source

Test

etomic
jl777 7 years ago
parent
commit
83a05411e8
  1. 6
      iguana/exchanges/LP_ordermatch.c
  2. 4
      iguana/exchanges/LP_socket.c
  3. 2
      iguana/exchanges/LP_utxo.c

6
iguana/exchanges/LP_ordermatch.c

@ -416,7 +416,7 @@ struct LP_utxoinfo *LP_address_myutxopair(struct LP_utxoinfo *butxo,int32_t iamb
{
if ( (m= LP_address_utxo_ptrs(coin,iambob,utxos,max,ap,coinaddr)) > 1 )
{
if ( 1 )
if ( 0 )
{
int32_t i;
for (i=0; i<m; i++)
@ -429,11 +429,11 @@ struct LP_utxoinfo *LP_address_myutxopair(struct LP_utxoinfo *butxo,int32_t iamb
{
up = utxos[mini];
utxos[mini] = 0;
printf("found mini.%d %.8f for targetval %.8f -> targetval2 %.8f, ratio %.2f\n",mini,dstr(up->U.value),dstr(targetval),dstr(targetval2),(double)up->U.value/targetval);
//printf("found mini.%d %.8f for targetval %.8f -> targetval2 %.8f, ratio %.2f\n",mini,dstr(up->U.value),dstr(targetval),dstr(targetval2),(double)up->U.value/targetval);
if ( (double)up->U.value/targetval < ratio-1 )
{
if ( 1 )
if ( 0 )
{
int32_t i;
for (i=0; i<m; i++)

4
iguana/exchanges/LP_socket.c

@ -419,9 +419,7 @@ 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());
//printf("%s %s",symbol,stratumreq);
memset(ep->buf,0,ep->bufsize);
sitem = electrum_sitem(ep,stratumreq,timeout,retjsonp);
portable_mutex_lock(&ep->mutex); // this helps performance!

2
iguana/exchanges/LP_utxo.c

@ -455,7 +455,7 @@ struct LP_address *LP_address_utxo_reset(struct iguana_info *coin)
//{"tx_hash":"38d1b7c73015e1b1d6cb7fc314cae402a635b7d7ea294970ab857df8777a66f4","tx_pos":0,"height":577975,"value":238700}
item = jitem(array,i);
value = LP_listunspent_parseitem(coin,&txid,&vout,&height,item);
if ( (txobj= LP_gettxout(coin->symbol,coin->symbol,txid,vout)) == 0 )
if ( (txobj= LP_gettxout(coin->symbol,coin->smartaddr,txid,vout)) == 0 )
continue;
else free_json(txobj);
LP_address_utxoadd(now,"withdraw",coin,coin->smartaddr,txid,vout,value,height,-1);

Loading…
Cancel
Save