diff --git a/iguana/iguana777.h b/iguana/iguana777.h index 0ee952e5a..e53e3557d 100755 --- a/iguana/iguana777.h +++ b/iguana/iguana777.h @@ -39,7 +39,7 @@ typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t #define IGUANA_MAXPENDHDRS 1 #define _IGUANA_MAXPENDING 3 #define IGUANA_MINPENDBUNDLES 8 -#define IGUANA_MAXPENDBUNDLES 32 +#define IGUANA_MAXPENDBUNDLES 8 #define IGUANA_BUNDLELOOP 77 #define IGUANA_RPCPORT 7778 #define IGUANA_MAXRAMCHAINSIZE ((uint64_t)1024L * 1024L * 1024L * 16) diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index b64b8183d..512df107e 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -622,7 +622,7 @@ int64_t iguana_bundlecalcs(struct iguana_info *coin,struct iguana_bundle *bp) printf("iguana_bundlecalcs.(%s) illegal hdrsi.%d bundlei.%d checki.%d\n",fname,hdrsi,bundlei,checki); continue; } - if ( 0 && bp->checkedtmp < bp->n && (fp= fopen(fname,"rb")) != 0 ) + if ( 1 && bp->checkedtmp < bp->n && (fp= fopen(fname,"rb")) != 0 ) { fseek(fp,0,SEEK_END); if ( block->RO.recvlen == 0 ) diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index e53879bea..b84613fb7 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -190,7 +190,7 @@ void iguana_gotblockM(struct iguana_info *coin,struct iguana_peer *addr,struct i printf("got block that doesnt validate? %s\n",bits256_str(str,origtxdata->block.RO.hash2)); return; } //else printf("validated prev.%s\n",bits256_str(str,origtxdata->block.RO.prev_block)); - copyflag = 0 * (strcmp(coin->symbol,"BTC") != 0); + copyflag = 1 * (strcmp(coin->symbol,"BTC") != 0); bp = 0, bundlei = -2; if ( copyflag != 0 && recvlen != 0 && ((bp= iguana_bundlefind(coin,&bp,&bundlei,origtxdata->block.RO.hash2)) == 0 || (bp->blocks[bundlei] != 0 && bp->blocks[bundlei]->fpipbits == 0)) ) { @@ -634,12 +634,12 @@ struct iguana_bundlereq *iguana_recvblockhashes(struct iguana_info *coin,struct } } } - printf("no match to allhashes issue block1\n"); + //printf("no match to allhashes issue block1\n"); struct iguana_block *block; if ( num == coin->chain->bundlesize+1 && (block= iguana_blockhashset(coin,-1,blockhashes[1],1)) != 0 ) { block->blockhashes = blockhashes, req->hashes = 0; - printf("set block->blockhashes[%d]\n",num); + //printf("set block->blockhashes[%d]\n",num); } if ( (addr= coin->peers.ranked[0]) != 0 ) { @@ -972,13 +972,13 @@ int32_t iguana_reqhdrs(struct iguana_info *coin) int32_t i,lag,n = 0; struct iguana_bundle *bp; char hashstr[65]; if ( queue_size(&coin->hdrsQ) == 0 ) { - //if ( iguana_needhdrs(coin) > 0 ) + if ( iguana_needhdrs(coin) > 0 ) { for (i=0; ibundlescount; i++) { if ( (bp= coin->bundles[i]) != 0 && (bp->numhashes < bp->n || i == coin->bundlescount-1) ) { - lag = 30; + lag = 60; if ( bp->bundleheight+bp->numhashes < coin->longestchain && time(NULL) > bp->issuetime+lag ) { //printf("LAG.%ld hdrsi.%d numhashes.%d:%d needhdrs.%d qsize.%d zcount.%d\n",time(NULL)-bp->hdrtime,i,bp->numhashes,bp->n,iguana_needhdrs(coin),queue_size(&coin->hdrsQ),coin->zcount); @@ -1097,7 +1097,7 @@ int32_t iguana_pollQsPT(struct iguana_info *coin,struct iguana_peer *addr) } if ( bp == 0 || z != 0 ) { - printf("%s request HDR.(%s) numhashes.%d\n",addr!=0?addr->ipaddr:"local",hashstr,bp!=0?bp->numhashes:0); + //printf("%s request HDR.(%s) numhashes.%d\n",addr!=0?addr->ipaddr:"local",hashstr,bp!=0?bp->numhashes:0); iguana_send(coin,addr,serialized,datalen); addr->pendhdrs++; flag++;