From f1fbe7e31071d54073b837b5069363523ee33cf9 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 27 Mar 2016 23:48:44 -0300 Subject: [PATCH] test --- iguana/iguana777.c | 2 +- iguana/iguana_bundles.c | 4 ++-- iguana/main.c | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/iguana/iguana777.c b/iguana/iguana777.c index 02b03998c..764440c84 100755 --- a/iguana/iguana777.c +++ b/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 ) diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index 3293bee47..a480ddeba 100755 --- a/iguana/iguana_bundles.c +++ b/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); diff --git a/iguana/main.c b/iguana/main.c index 1aaa21c5b..e2ee5b1b7 100755 --- a/iguana/main.c +++ b/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); } } }