diff --git a/iguana/iguana777.c b/iguana/iguana777.c index 2575ac0b4..56e129852 100755 --- a/iguana/iguana777.c +++ b/iguana/iguana777.c @@ -402,7 +402,9 @@ void iguana_helper(void *arg) else iguana_bundleQ(ptr->coin,bp,1000); if ( coin->current != 0 && coin->current->hdrsi != coin->bundlescount-1 ) allcurrent = 0; - } else printf("helper missing param? %p %p %u\n",ptr->coin,bp,ptr->timelimit); + } + else if ( coin->active != 0 ) + printf("helper missing param? %p %p %u\n",ptr->coin,bp,ptr->timelimit); myfree(ptr,ptr->allocsize); flag++; } diff --git a/iguana/iguana777.h b/iguana/iguana777.h index ff7c7a96a..5a9462311 100755 --- a/iguana/iguana777.h +++ b/iguana/iguana777.h @@ -824,6 +824,7 @@ void iguana_autoextend(struct iguana_info *coin,struct iguana_bundle *bp); void iguana_RTramchainfree(struct iguana_info *coin); void iguana_coinpurge(struct iguana_info *coin); int32_t iguana_setmaxbundles(struct iguana_info *coin); +void iguana_bundlepurgefiles(struct iguana_info *coin,struct iguana_bundle *bp); extern int32_t HDRnet,netBLOCKS; diff --git a/iguana/main.c b/iguana/main.c index 4f7e83fb7..17175f87d 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -353,7 +353,7 @@ void mainloop(struct supernet_info *myinfo) if ( 1 ) { for (i=0; icurrent) != 0 ) + if ( (coin= Coins[i]) != 0 && coin->current != 0 ) { if ( coin->active != 0 && coin->started != 0 ) { @@ -373,9 +373,10 @@ void mainloop(struct supernet_info *myinfo) } myfree(ptr,ptr->allocsize); } - if ( coin->stucktime != 0 && coin->isRT == 0 && coin->RTheight == 0 && (time(NULL) - coin->stucktime) > coin->MAXSTUCKTIME ) + if ( (bp= coin->current) != 0 && coin->stucktime != 0 && coin->isRT == 0 && coin->RTheight == 0 && (time(NULL) - coin->stucktime) > coin->MAXSTUCKTIME ) { printf("%s is stuck too long, restarting\n",coin->symbol); + iguana_bundlepurgefiles(coin,bp); iguana_coinpurge(coin); sleep(5); coin->active = 1;