Browse Source

Test

etomic
jl777 7 years ago
parent
commit
b0e068144d
  1. 9
      iguana/exchanges/LP_ordermatch.c
  2. 2
      iguana/exchanges/LP_prices.c

9
iguana/exchanges/LP_ordermatch.c

@ -1240,9 +1240,14 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson,
}
}
price = LP_myprice(&bid,&ask,Q.srccoin,Q.destcoin);
if ( (coin= LP_coinfind(Q.srccoin)) == 0 || price <= SMALLVAL || ask <= SMALLVAL )
if ( (coin= LP_coinfind(Q.srccoin)) == 0 || coin->inactive != 0 )
{
printf("this node has no price for %s/%s\n",Q.srccoin,Q.destcoin);
printf("%s is not active\n",Q.srccoin);
return(retval);
}
if ( price <= SMALLVAL || ask <= SMALLVAL )
{
//printf("this node has no price for %s/%s\n",Q.srccoin,Q.destcoin);
return(retval);
}
if ( LP_aliceonly(Q.srccoin) > 0 )

2
iguana/exchanges/LP_prices.c

@ -576,7 +576,7 @@ int32_t LP_mypriceset(int32_t *changedp,char *base,char *rel,double price)
if ( fabs(basepp->myprices[relpp->ind] - price)/price > 0.001 )
*changedp = 1;
basepp->myprices[relpp->ind] = price; // ask
printf("LP_mypriceset base.%s rel.%s <- price %.8f\n",base,rel,price);
//printf("LP_mypriceset base.%s rel.%s <- price %.8f\n",base,rel,price);
//relpp->myprices[basepp->ind] = (1. / price); // bid
if ( (pubp= LP_pubkeyadd(G.LP_mypub25519)) != 0 )
{

Loading…
Cancel
Save