|
|
@ -459,8 +459,8 @@ int32_t iguana_utxogen(struct supernet_info *myinfo,struct iguana_info *coin,int |
|
|
|
return(0); |
|
|
|
} |
|
|
|
printf("helperid.%d start utxogen\n",helperid); |
|
|
|
if ( (incr= IGUANA_NUMHELPERS) > 4 ) |
|
|
|
incr = 4; |
|
|
|
if ( (incr= IGUANA_NUMHELPERS) > 8 ) |
|
|
|
incr = 8; |
|
|
|
//if ( 1 || coin->PREFETCHLAG > 0 ) // data issues on slow systems
|
|
|
|
// incr = 1;
|
|
|
|
max = coin->bundlescount; |
|
|
@ -538,18 +538,18 @@ int32_t iguana_utxogen(struct supernet_info *myinfo,struct iguana_info *coin,int |
|
|
|
|
|
|
|
void iguana_helper(void *arg) |
|
|
|
{ |
|
|
|
static int32_t maxhelperid; |
|
|
|
static uint64_t helperidbits; |
|
|
|
cJSON *argjson=0; int32_t iter,n,j,polltimeout,type,helperid=rand(),flag,allcurrent,idle=0; |
|
|
|
struct iguana_helper *ptr; struct iguana_info *coin,*tmp; struct OS_memspace MEM,*MEMB; struct iguana_bundle *bp; struct supernet_info *myinfo = SuperNET_MYINFO(0); |
|
|
|
helperid %= 64; |
|
|
|
if ( arg != 0 && (argjson= cJSON_Parse(arg)) != 0 ) |
|
|
|
helperid = juint(argjson,"helperid"); |
|
|
|
if ( helperid > maxhelperid ) |
|
|
|
maxhelperid = helperid; |
|
|
|
if ( helperid < maxhelperid ) |
|
|
|
if ( ((1 << helperid) & helperidbits) != 0 ) |
|
|
|
{ |
|
|
|
printf("SKIP duplicate helper.%d\n",helperid); |
|
|
|
return; |
|
|
|
} |
|
|
|
helperidbits |= (1 << helperid); |
|
|
|
if ( IGUANA_NUMHELPERS < 2 ) |
|
|
|
type = 3; |
|
|
|
else type = (1 << (helperid % 2)); |
|
|
|