diff --git a/iguana/iguana777.h b/iguana/iguana777.h index 9975b07e4..a2ec7af93 100755 --- a/iguana/iguana777.h +++ b/iguana/iguana777.h @@ -41,7 +41,7 @@ typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t #define IGUANA_HEADPERCENTAGE 0. #define IGUANA_TAILPERCENTAGE 1.0 #define IGUANA_MAXPENDHDRS 1 -#define _IGUANA_MAXPENDING 3 +#define _IGUANA_MAXPENDING 8 #define IGUANA_MINPENDBUNDLES 2 #define IGUANA_MAXPENDBUNDLES 64 #define IGUANA_BUNDLELOOP 77 diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index 97e5b6d5d..c87f8dbe7 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -941,6 +941,11 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru } for (i=n=0; in; i++) { + if ( lag < coin->MAXSTUCKTIME ) + { + if ( bits256_nonz(bp->hashes[i]) != 0 ) + iguana_blockQ("stuck",coin,bp,i,bp->hashes[i],0); + } if ( (block= bp->blocks[i]) != 0 && (block->RO.recvlen == 0 || block->fpos < 0 || block->fpipbits == 0 || bits256_nonz(block->RO.prev_block) == 0) ) { if ( time(NULL) > block->issued+10 ) @@ -1054,13 +1059,14 @@ void iguana_bundlestats(struct iguana_info *coin,char *str) } // else break; } } - else if ( bp == coin->current ) + else if ( 0 && bp == coin->current ) { for (j=0; jn; j++) if ( (block= bp->blocks[j]) != 0 && (block->RO.recvlen == 0 || block->fpipbits == 0 || block->fpos < 0) && time(NULL) > block->issued+3 && (rand() % 10) == 0 ) { if ( (r= coin->peers.numranked) != 0 && (addr= coin->peers.ranked[rand() % r]) != 0 && addr->dead == 0 && addr->usock >= 0 ) - iguana_sendblockreqPT(coin,addr,bp,j,block->RO.hash2,0); printf("kick [%d:%d]\n",bp->hdrsi,j); + iguana_sendblockreqPT(coin,addr,bp,j,block->RO.hash2,0); + printf("currentstop [%d:%d]\n",bp->hdrsi,j); iguana_blockQ("currentstop",coin,bp,j,block->RO.hash2,1); block->issued = (uint32_t)time(NULL); break;