Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
04f48a51b5
  1. 17
      iguana/iguana777.c
  2. 2
      iguana/iguana_bundles.c

17
iguana/iguana777.c

@ -445,13 +445,6 @@ int32_t iguana_utxogen(struct iguana_info *coin,int32_t helperid,int32_t convert
if ( iguana_balanceflush(coin,max) > 0 )
printf("balanceswritten.%d flushed bp->hdrsi %d vs %d coin->longestchain/coin->chain->bundlesize\n",coin->balanceswritten,bp->hdrsi,coin->longestchain/coin->chain->bundlesize);
} else printf("error saving spendvectors\n");
coin->spendvectorsaved = (uint32_t)time(NULL);
printf("UTXOGEN spendvectorsaved <- %u\n",coin->spendvectorsaved);
}
while ( coin->spendvectorsaved == 1 )
{
//printf("helperid.%d waiting for spendvectorsaved.%u\n",helperid,coin->spendvectorsaved);
sleep(3);
}
for (hdrsi=helperid; hdrsi<max; hdrsi+=incr)
{
@ -463,6 +456,16 @@ int32_t iguana_utxogen(struct iguana_info *coin,int32_t helperid,int32_t convert
exit(-1);
}
}
while ( coin->spendvectorsaved == 1 )
{
//printf("helperid.%d waiting for spendvectorsaved.%u\n",helperid,coin->spendvectorsaved);
sleep(3);
}
if ( helperid == 0 )
{
coin->spendvectorsaved = (uint32_t)time(NULL);
printf("UTXOGEN spendvectorsaved <- %u\n",coin->spendvectorsaved);
}
return(num);
}

2
iguana/iguana_bundles.c

@ -1353,7 +1353,7 @@ void iguana_bundlestats(struct iguana_info *coin,char *str,int32_t lag)
}
}
//sprintf(str+strlen(str),"%s.%-2d %s time %.2f files.%d Q.%d %d\n",coin->symbol,flag,str,(double)(time(NULL)-coin->starttime)/60.,coin->peers.numfiles,queue_size(&coin->priorityQ),queue_size(&coin->blocksQ));
if ( time(NULL) > coin->lastdisp+3 && (strcmp(str,coin->lastdispstr) != 0 || time(NULL) > coin->lastdisp+60) )
if ( time(NULL) > coin->lastdisp+7 && (strcmp(str,coin->lastdispstr) != 0 || time(NULL) > coin->lastdisp+60) )
{
printf("%s bQ.%d %d:%02d:%02d stuck.%d max.%d\n",str,queue_size(&bundlesQ),(int32_t)difft.x/3600,(int32_t)(difft.x/60)%60,(int32_t)difft.x%60,coin->stucktime!=0?(uint32_t)time(NULL) - coin->stucktime:0,coin->maxstuck);
strcpy(coin->lastdispstr,str);

Loading…
Cancel
Save