From fcabca69d6d24b99a493c5d2fa7edb3334665c30 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 11 Sep 2017 10:02:51 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_socket.c | 1 + iguana/exchanges/mm.c | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/iguana/exchanges/LP_socket.c b/iguana/exchanges/LP_socket.c index b975302f5..eef94ce7c 100644 --- a/iguana/exchanges/LP_socket.c +++ b/iguana/exchanges/LP_socket.c @@ -364,6 +364,7 @@ void LP_dedicatedloop(char *symbol,char *ipaddr,uint16_t port) { struct pollfd fds; int32_t i,len,flag,timeout = 10; struct stritem *sitem; struct electrum_info *ep; ep = LP_electrum_info(symbol,ipaddr,port,IGUANA_MAXPACKETSIZE * 10); + printf("ep.%p for %s:%u num.%d\n",ep,ep->ipaddr,ep->port,Num_electrums); while ( ep->sock >= 0 ) { flag = 0; diff --git a/iguana/exchanges/mm.c b/iguana/exchanges/mm.c index 1ede94037..db949f192 100644 --- a/iguana/exchanges/mm.c +++ b/iguana/exchanges/mm.c @@ -805,9 +805,12 @@ int main(int argc, const char * argv[]) OS_init(); printf("call test\n"); LP_dedicatedloop("BTC","46.4.125.2",50001);//88.198.241.196",50001); - electrum_test(); - while ( 1 ) - sleep(1); + if ( (1) ) + { + electrum_test(); + while ( 1 ) + sleep(1); + } sprintf(dirname,"%s",GLOBAL_DBDIR), OS_ensure_directory(dirname); sprintf(dirname,"%s/SWAPS",GLOBAL_DBDIR), OS_ensure_directory(dirname); sprintf(dirname,"%s/PRICES",GLOBAL_DBDIR), OS_ensure_directory(dirname); @@ -821,7 +824,7 @@ int main(int argc, const char * argv[]) exit(-1); } else printf("(%s) launched.(%s)\n",argv[1],passphrase); incr = 100.; - while ( 1 ) + while ( (1) ) sleep(1); profitmargin = jdouble(retjson,"profitmargin"); minask = jdouble(retjson,"minask");