jl777 7 years ago
parent
commit
ed518fdcab
  1. 12
      iguana/exchanges/LP_nativeDEX.c

12
iguana/exchanges/LP_nativeDEX.c

@ -502,7 +502,7 @@ void command_rpcloop(void *ctx)
void LP_coinsloop(void *_coins) void LP_coinsloop(void *_coins)
{ {
struct LP_address *ap=0,*atmp; struct LP_transaction *tx; cJSON *retjson; struct LP_address_utxo *up,*tmp; struct iguana_info *coin,*ctmp; char str[65]; struct electrum_info *ep,*backupep=0; bits256 zero; int32_t notarized,oldht,j,nonz; char *coins = _coins; struct LP_address *ap=0; struct LP_transaction *tx; cJSON *retjson; struct LP_address_utxo *up,*tmp; struct iguana_info *coin,*ctmp; char str[65]; struct electrum_info *ep,*backupep=0; bits256 zero; int32_t notarized,oldht,j,nonz; char *coins = _coins;
if ( strcmp("BTC",coins) == 0 ) if ( strcmp("BTC",coins) == 0 )
{ {
strcpy(LP_coinsloopBTC_stats.name,"BTC coin loop"); strcpy(LP_coinsloopBTC_stats.name,"BTC coin loop");
@ -533,7 +533,7 @@ void LP_coinsloop(void *_coins)
nonz = 0; nonz = 0;
HASH_ITER(hh,LP_coins,coin,ctmp) // firstrefht,firstscanht,lastscanht HASH_ITER(hh,LP_coins,coin,ctmp) // firstrefht,firstscanht,lastscanht
{ {
/*if ( coins != 0 ) if ( coins != 0 )
{ {
if ( coins[0] != 0 ) if ( coins[0] != 0 )
{ {
@ -545,7 +545,7 @@ void LP_coinsloop(void *_coins)
if ( strcmp("BTC",coin->symbol) == 0 || strcmp("KMD",coin->symbol) == 0 ) if ( strcmp("BTC",coin->symbol) == 0 || strcmp("KMD",coin->symbol) == 0 )
continue; continue;
} }
}*/ }
if ( coin->smartaddr[0] == 0 ) if ( coin->smartaddr[0] == 0 )
{ {
printf("%s has no smartaddress??\n",coin->symbol); printf("%s has no smartaddress??\n",coin->symbol);
@ -638,7 +638,7 @@ void LP_coinsloop(void *_coins)
coin->lastscanht = coin->firstscanht; coin->lastscanht = coin->firstscanht;
continue; continue;
} }
if ( strcmp(coin->symbol,"BTC") != 0 && strcmp(coin->symbol,"KMD") != 0 ) // SPV as backup //if ( strcmp(coin->symbol,"BTC") != 0 && strcmp(coin->symbol,"KMD") != 0 ) // SPV as backup
{ {
nonz++; nonz++;
if ( strcmp("BTC",coins) == 0 )//&& coin->lastscanht < coin->longestchain-3 ) if ( strcmp("BTC",coins) == 0 )//&& coin->lastscanht < coin->longestchain-3 )
@ -1384,7 +1384,7 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybu
printf("error launching LP_coinsloop for (%s)\n",""); printf("error launching LP_coinsloop for (%s)\n","");
exit(-1); exit(-1);
} }
/*if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)LP_coinsloop,(void *)"BTC") != 0 ) if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)LP_coinsloop,(void *)"BTC") != 0 )
{ {
printf("error launching LP_coinsloop for (%s)\n","BTC"); printf("error launching LP_coinsloop for (%s)\n","BTC");
exit(-1); exit(-1);
@ -1393,7 +1393,7 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybu
{ {
printf("error launching LP_coinsloop for (%s)\n","KMD"); printf("error launching LP_coinsloop for (%s)\n","KMD");
exit(-1); exit(-1);
}*/ }
if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)LP_pubkeysloop,ctx) != 0 ) if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)LP_pubkeysloop,ctx) != 0 )
{ {
printf("error launching LP_pubkeysloop for ctx.%p\n",ctx); printf("error launching LP_pubkeysloop for ctx.%p\n",ctx);

Loading…
Cancel
Save