From 83293ad5b26a1343066b5c726579bc1326183f95 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 16 Nov 2017 10:52:49 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_nativeDEX.c | 18 +++++++++--------- iguana/exchanges/LP_utxo.c | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index dce105e65..220770d43 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -1028,23 +1028,23 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybu printf("error launching LP_psockloop for (%s)\n",myipaddr); exit(-1); } - if ( 0 && OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)LP_reserved_msgs,(void *)myipaddr) != 0 ) + if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)LP_reserved_msgs,(void *)myipaddr) != 0 ) { printf("error launching LP_reserved_msgs for (%s)\n",myipaddr); exit(-1); } - if ( 0 && OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)utxosQ_loop,(void *)myipaddr) != 0 ) + if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)utxosQ_loop,(void *)myipaddr) != 0 ) { printf("error launching utxosQ_loop for (%s)\n",myipaddr); exit(-1); } - if ( 0 && OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)stats_rpcloop,(void *)&myport) != 0 ) + if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)stats_rpcloop,(void *)&myport) != 0 ) { printf("error launching stats rpcloop for port.%u\n",myport); exit(-1); } uint16_t myport2 = myport-1; - if ( 0 && OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)stats_rpcloop,(void *)&myport2) != 0 ) + if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)stats_rpcloop,(void *)&myport2) != 0 ) { printf("error launching stats rpcloop for port.%u\n",myport); exit(-1); @@ -1054,7 +1054,7 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybu printf("error launching command_rpcloop for port.%u\n",myport); exit(-1); } - if ( 0 && OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)queue_loop,(void *)myipaddr) != 0 ) + if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)queue_loop,(void *)myipaddr) != 0 ) { printf("error launching queue_loop for port.%u\n",myport); exit(-1); @@ -1206,7 +1206,7 @@ int32_t zeroval() { return(0); } void *LP_alloc(uint64_t len) { - //return(calloc(1,len)); +return(calloc(1,len)); LP_cjson_allocated += len; LP_cjson_total += len; LP_cjson_count++; @@ -1225,7 +1225,7 @@ void *LP_alloc(uint64_t len) void LP_free(void *ptr) { static uint32_t lasttime,unknown; - // free(ptr); return; +free(ptr); return; uint32_t now; char str[65]; int32_t n,lagging; uint64_t total = 0; struct LP_memory_list *mp,*tmp; if ( (now= (uint32_t)time(NULL)) > lasttime+60 ) { @@ -1268,7 +1268,7 @@ void LP_free(void *ptr) } else unknown++; // free from source file with #define redirect for alloc that wasnt } -char *LP_clonestr(char *str) +/*char *LP_clonestr(char *str) { char *retstr = LP_alloc(strlen(str)+1); strcpy(retstr,str); @@ -1278,6 +1278,6 @@ char *LP_clonestr(char *str) void *LP_realloc(void *ptr,uint64_t len) { return(realloc(ptr,len)); -} +}*/ diff --git a/iguana/exchanges/LP_utxo.c b/iguana/exchanges/LP_utxo.c index 59b8b8b8e..4458feaa1 100644 --- a/iguana/exchanges/LP_utxo.c +++ b/iguana/exchanges/LP_utxo.c @@ -382,7 +382,7 @@ int32_t LP_address_utxoadd(uint32_t timestamp,char *debug,struct iguana_info *co break; } } - if ( flag == 0 && value != 0 ) + if ( 0 && flag == 0 && value != 0 ) { if ( coin->electrum == 0 ) { @@ -739,7 +739,7 @@ struct LP_transaction *LP_transactionadd(struct iguana_info *coin,bits256 txid,i cJSON *LP_transactioninit(struct iguana_info *coin,bits256 txid,int32_t iter,cJSON *txobj) { struct LP_transaction *tx; int32_t i,height,numvouts,numvins,spentvout; cJSON *vins,*vouts,*vout,*vin; bits256 spenttxid; char str[65]; - if ( coin->inactive != 0 ) + //if ( coin->inactive != 0 ) return(0); if ( txobj != 0 || (txobj= LP_gettx(coin->symbol,txid)) != 0 ) {