Browse Source

Test

etomic
jl777 8 years ago
parent
commit
344a1f4deb
  1. 3
      iguana/exchanges/LP_ordermatch.c

3
iguana/exchanges/LP_ordermatch.c

@ -440,12 +440,13 @@ char *LP_connectedalice(cJSON *argjson) // alice
printf("quote validate error %.0f\n",qprice);
return(clonestr("{\"error\":\"quote validation error\"}"));
}
if ( (price= LP_myprice(&bid,&ask,Q.destcoin,Q.srccoin)) <= SMALLVAL || bid <= SMALLVAL )
if ( LP_myprice(&bid,&ask,Q.destcoin,Q.srccoin) <= SMALLVAL || (bid <= SMALLVAL && ask <= SMALLVAL) )
{
printf("this node has no price for %s/%s (%.8f %.8f)\n",Q.destcoin,Q.srccoin,bid,ask);
LP_availableset(autxo);
return(clonestr("{\"error\":\"no price set\"}"));
}
if ( (price= ask) == 0. )
price = 1. / bid;
if ( qprice > price+0.00000001 )
{

Loading…
Cancel
Save