Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
f1fbe7e310
  1. 2
      iguana/iguana777.c
  2. 4
      iguana/iguana_bundles.c
  3. 4
      iguana/main.c

2
iguana/iguana777.c

@ -403,7 +403,7 @@ void iguana_helper(void *arg)
flag += iguana_bundleiters(ptr->coin,&MEM,MEMB,bp,ptr->timelimit);
else
{
printf("skip.%d lag.%ld\n",bp->hdrsi,time(NULL)-bp->nexttime);
printf("skip.%d lag.%ld coin->active.%d\n",bp->hdrsi,time(NULL)-bp->nexttime,coin->active);
iguana_bundleQ(ptr->coin,bp,1000);
}
if ( coin->current != 0 && coin->current->hdrsi != coin->bundlescount-1 )

4
iguana/iguana_bundles.c

@ -842,7 +842,7 @@ int32_t iguana_bundlefinish(struct iguana_info *coin,struct iguana_bundle *bp)
int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,struct OS_memspace *memB,struct iguana_bundle *bp,int32_t timelimit)
{
int32_t range,starti,lasti,i,n,len,retval=0,max,counter = 0; struct iguana_block *block; struct iguana_bundle *currentbp,*lastbp; uint8_t serialized[512]; struct iguana_peer *addr; long lag; struct iguana_blockreq *breq;
if ( coin->started == 0 )
if ( coin->started == 0 || coin->active == 0 )
{
printf("%s not ready yet\n",coin->symbol);
bp->nexttime = (uint32_t)time(NULL) + 3;
@ -875,7 +875,7 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru
{
if ( (retval= iguana_bundlefinish(coin,bp)) > 0 )
{
printf("moved to balancesQ.%d bundleiters.%d\n",bp->hdrsi,bp->bundleheight);
//printf("moved to balancesQ.%d bundleiters.%d\n",bp->hdrsi,bp->bundleheight);
bp->queued = 0;
return(0);
} //else printf("finish incomplete.%d\n",bp->hdrsi);

4
iguana/main.c

@ -387,15 +387,17 @@ void mainloop(struct supernet_info *myinfo)
{
if ( 1 )
{
printf("%s is stuck too long, purging files for %d\n",coin->symbol,bp->hdrsi);
printf("%s is stuck too long, restarting due to %d\n",coin->symbol,bp->hdrsi);
if ( coin->started != 0 )
{
iguana_coinpurge(coin);
sleep(3);
while ( coin->started == 0 )
{
printf("wait for coin to reactivate\n");
sleep(1);
}
sleep(3);
}
}
}

Loading…
Cancel
Save