|
@ -768,9 +768,9 @@ void iguana_coinloop(void *arg) |
|
|
} |
|
|
} |
|
|
//printf("%s flag.%d isRT.%d polltimeout.%d numranked.%d\n",coin->symbol,flag,coin->isRT,coin->polltimeout,coin->peers->numranked);
|
|
|
//printf("%s flag.%d isRT.%d polltimeout.%d numranked.%d\n",coin->symbol,flag,coin->isRT,coin->polltimeout,coin->peers->numranked);
|
|
|
if ( flag == 0 && coin->isRT == 0 && coin->peers != 0 ) |
|
|
if ( flag == 0 && coin->isRT == 0 && coin->peers != 0 ) |
|
|
usleep(coin->polltimeout*1000 + (coin->peers->numranked == 0)*1000000); |
|
|
usleep(coin->polltimeout*5000 + (coin->peers->numranked == 0)*1000000); |
|
|
else if ( coin->current != 0 && coin->current->hdrsi == coin->longestchain/coin->chain->bundlesize ) |
|
|
else if ( coin->current != 0 && coin->current->hdrsi == coin->longestchain/coin->chain->bundlesize ) |
|
|
usleep(coin->polltimeout*1000 + 90000 + (coin->peers->numranked == 0)*1000000); |
|
|
usleep(coin->polltimeout*5000 + 90000 + (coin->peers->numranked == 0)*1000000); |
|
|
else usleep(coin->polltimeout*1000); |
|
|
else usleep(coin->polltimeout*1000); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -867,7 +867,7 @@ struct iguana_info *iguana_setcoin(char *symbol,void *launched,int32_t maxpeers, |
|
|
if ( coin->MAXMEM == 0 ) |
|
|
if ( coin->MAXMEM == 0 ) |
|
|
coin->MAXMEM = IGUANA_DEFAULTRAM; |
|
|
coin->MAXMEM = IGUANA_DEFAULTRAM; |
|
|
coin->MAXMEM *= (1024L * 1024 * 1024); |
|
|
coin->MAXMEM *= (1024L * 1024 * 1024); |
|
|
coin->enableCACHE = 0;//(strcmp("BTCD",coin->symbol) == 0);
|
|
|
coin->enableCACHE = (strcmp("BTCD",coin->symbol) == 0); |
|
|
if ( jobj(json,"cache") != 0 ) |
|
|
if ( jobj(json,"cache") != 0 ) |
|
|
coin->enableCACHE = juint(json,"cache"); |
|
|
coin->enableCACHE = juint(json,"cache"); |
|
|
if ( (coin->polltimeout= juint(json,"poll")) <= 0 ) |
|
|
if ( (coin->polltimeout= juint(json,"poll")) <= 0 ) |
|
|