Browse Source

Test

etomic
jl777 7 years ago
parent
commit
b84513a92e
  1. 6
      iguana/exchanges/LP_nativeDEX.c
  2. 1
      iguana/exchanges/LP_prices.c

6
iguana/exchanges/LP_nativeDEX.c

@ -284,14 +284,14 @@ int32_t LP_sock_check(char *typestr,void *ctx,char *myipaddr,int32_t pubsock,int
#ifdef FROM_JS
printf("%s RECV.(%s)\n",typestr,(char *)ptr);
#endif
cJSON *recvjson; //char *mstr,*cstr;
cJSON *recvjson; char *mstr,*cstr;
if ( (recvjson= cJSON_Parse((char *)ptr)) != 0 )
{
/*if ( (mstr= jstr(recvjson,"method")) != 0 && strcmp(mstr,"uitem") == 0 &&
if ( (mstr= jstr(recvjson,"method")) != 0 && strcmp(mstr,"uitem") == 0 &&
(cstr= jstr(recvjson,"coin")) != 0 && strcmp(cstr,"REVS") == 0 )
{
printf("%s RECV.(%s)\n",typestr,(char *)ptr);
}*/
}
safecopy(methodstr,jstr(recvjson,"method"),sizeof(methodstr));
free_json(recvjson);
}

1
iguana/exchanges/LP_prices.c

@ -1060,6 +1060,7 @@ void LP_pricefeedupdate(bits256 pubkey,char *base,char *rel,double price)
}
if ( (pubp= LP_pubkeyadd(pubkey)) != 0 )
{
if ( (rand() % 100) == 0 )
printf("PRICEFEED UPDATE.(%-6s/%6s) %12.8f %s %12.8f\n",base,rel,price,bits256_str(str,pubkey),1./price);
if ( fabs(pubp->matrix[basepp->ind][relpp->ind] - price) > SMALLVAL )
{

Loading…
Cancel
Save