Browse Source

Test

etomic
jl777 7 years ago
parent
commit
dbda4bac05
  1. 5
      iguana/exchanges/LP_portfolio.c
  2. 4
      iguana/exchanges/stats.c

5
iguana/exchanges/LP_portfolio.c

@ -298,7 +298,7 @@ void LP_autopriceset(void *ctx,int32_t dir,struct LP_priceinfo *basepp,struct LP
if ( (minprice= basepp->minprices[relpp->ind]) == 0. || price >= minprice )
{
LP_mypriceset(&changed,relpp->symbol,basepp->symbol,newprice);
//printf("autoprice changed.%d %s/%s <- %.8f\n",changed,basepp->symbol,relpp->symbol,price);
printf("autoprice changed.%d %s/%s <- %.8f\n",changed,basepp->symbol,relpp->symbol,price);
if ( changed != 0 || time(NULL) > lasttime+LP_ORDERBOOK_DURATION*.777)
{
lasttime = (uint32_t)time(NULL);
@ -468,7 +468,10 @@ void LP_autoprice_iter(void *ctx,struct LP_priceinfo *btcpp)
basepp = LP_priceinfofind(LP_autorefs[i].base);
relpp = LP_priceinfofind(LP_autorefs[i].rel);
if ( basepp != 0 && relpp != 0 )
{
printf("check ref-autoprice %s/%s\n",LP_autorefs[i].refbase,LP_autorefs[i].refrel);
LP_autopriceset(ctx,1,basepp,relpp,0,LP_autorefs[i].refbase,LP_autorefs[i].refrel);
}
}
}

4
iguana/exchanges/stats.c

@ -780,11 +780,11 @@ void stats_rpcloop(void *args)
printf("error launching rpc handler on port %d\n",port);
// yes, small leak per command
}
if ( 0 && IAMLP != 0 && ipbits != localhostbits )
/*if ( 0 && IAMLP != 0 && ipbits != localhostbits )
{
close(bindsock);
bindsock = iguana_socket(1,"0.0.0.0",port);
} //else printf("skip close and rebind\n");
} //else printf("skip close and rebind\n");*/
}
}

Loading…
Cancel
Save