diff --git a/iguana/iguana777.c b/iguana/iguana777.c index 80f116958..39f809936 100755 --- a/iguana/iguana777.c +++ b/iguana/iguana777.c @@ -444,7 +444,7 @@ struct iguana_info *iguana_setcoin(char *symbol,void *launched,int32_t maxpeers, if ( (coin->MAXRECVCACHE= maxrecvcache) == 0 ) coin->MAXRECVCACHE = IGUANA_MAXRECVCACHE; if ( (coin->MAXPENDING= maxpending) <= 0 ) - coin->MAXPENDING = (strcmp(symbol,"BTC") == 0) ? _IGUANA_MAXPENDING : _IGUANA_MAXPENDING*256; + coin->MAXPENDING = (strcmp(symbol,"BTC") == 0) ? _IGUANA_MAXPENDING : _IGUANA_MAXPENDING*64; if ( (coin->MAXBUNDLES= maxbundles) <= 0 ) coin->MAXBUNDLES = (strcmp(symbol,"BTC") == 0) ? _IGUANA_MAXBUNDLES : _IGUANA_MAXBUNDLES*64; coin->myservices = services; diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index 333560317..64960b995 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -565,8 +565,11 @@ void iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int32_ int32_t i,n,pend; uint32_t now; struct iguana_block *block; double endmillis; for (i=pend=0; ipeers.active[i].pendblocks; - //if ( pend >= coin->MAXPENDING*coin->MAXPEERS ) - // return; + if ( pend >= coin->MAXPENDING*coin->MAXPEERS ) + { + printf("SKIP pend.%d ITERATE bundle.%d n.%d r.%d s.%d finished.%d\n",pend,bp->bundleheight,bp->n,bp->numrecv,bp->numsaved,bp->emitfinish); + return; + } endmillis = OS_milliseconds() + timelimit; printf("ITERATE bundle.%d n.%d r.%d s.%d finished.%d\n",bp->bundleheight,bp->n,bp->numrecv,bp->numsaved,bp->emitfinish); memset(bp->issued,0,sizeof(bp->issued)); @@ -599,6 +602,6 @@ void iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int32_ iguana_emitQ(coin,bp); return; } - iguana_bundleQ(coin,bp,timelimit); + iguana_bundleQ(coin,bp,1000); } } diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index a72c75974..b166b19f8 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -310,7 +310,7 @@ uint32_t iguana_allhashcmp(struct iguana_info *coin,struct iguana_bundle *bp,bit } //printf("ALLHASHES FOUND! %d requested.%d\n",bp->bundleheight,n); bp->queued = (uint32_t)time(NULL); - iguana_bundleQ(coin,bp,1000 + (rand() % 2000)); + iguana_bundleQ(coin,bp,500 + (rand() % 500)); return(bp->queued); } } @@ -794,7 +794,7 @@ int32_t iguana_processrecv(struct iguana_info *coin) // single threaded if ( memcmp(next->RO.prev_block.bytes,coin->blocks.hwmchain.RO.hash2.bytes,sizeof(bits256)) == 0 ) { if ( _iguana_chainlink(coin,next) != 0 ) - lflag++; + lflag++, flag++; //else printf("chainlink error for %d\n",coin->blocks.hwmchain.height+1); } if ( 0 )