Browse Source

Test

etomic
jl777 8 years ago
parent
commit
8240b45820
  1. 8
      iguana/exchanges/LP_prices.c

8
iguana/exchanges/LP_prices.c

@ -259,12 +259,13 @@ struct LP_cacheinfo *LP_cacheadd(char *base,char *rel,bits256 txid,int32_t vout,
static int _cmp_orderbook(const void *a,const void *b)
{
int32_t retval = 0;
#define ptr_a ((struct LP_cacheinfo *)a)->price
#define ptr_b ((struct LP_cacheinfo *)b)->price
if ( ptr_b > ptr_a )
return(1);
retval = 1;
else if ( ptr_b < ptr_a )
return(-1);
retval = -1;
/* else
{
#undef ptr_a
@ -276,7 +277,8 @@ static int _cmp_orderbook(const void *a,const void *b)
else if ( ptr_b < ptr_a )
return(-1);
}*/
return(0);
printf("%.8f vs %.8f -> %d\n",ptr_a,ptr_b,retval);
return(retval);
#undef ptr_a
#undef ptr_b
}

Loading…
Cancel
Save