diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index 70d777105..b204fe95a 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -949,7 +949,7 @@ struct iguana_bundlereq *iguana_recvblock(struct iguana_info *coin,struct iguana } fprintf(stderr,"%s [%d:%d] block.%x | s.%d r.%d copy.%d\n",bits256_str(str,origblock->RO.hash2),bp!=0?bp->hdrsi:-1,bundlei,block->fpipbits,numsaved,numrecv,req->copyflag); } - if ( 0 && bundlei == 1 && bp != 0 && bp->numhashes < bp->n && coin->enableCACHE != 0 && bp->speculative == 0 ) + if ( 1 && bundlei == 1 && bp != 0 && bp->numhashes < bp->n && coin->enableCACHE != 0 && bp->speculative == 0 ) { //printf("reissue hdrs request for [%d]\n",bp->hdrsi); queue_enqueue("hdrsQ",&coin->hdrsQ,queueitem(bits256_str(str,bp->hashes[0])),1); diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index 938a50743..e84cee3fd 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -462,7 +462,7 @@ struct iguana_bundle *iguana_externalspent(struct iguana_info *coin,bits256 *pre iguana_ramchain_prefetch(coin,&spentbp->ramchain); spentbp->lastprefetch = (uint32_t)time(NULL); } - else if ( duration > (3 * coin->txidfind_totalmillis)/coin->txidfind_num ) + else if ( duration > (3 * coin->txidfind_totalmillis)/coin->txidfind_num && time(NULL) > spentbp->lastprefetch+coin->PREFETCHLAG ) { printf("slow txidfind %.2f vs %.2f prefetch[%d] from.[%d] lag.%ld\n",duration,coin->txidfind_totalmillis/coin->txidfind_num,spentbp->hdrsi,ramchain->H.data->height/coin->chain->bundlesize,time(NULL) - spentbp->lastprefetch); iguana_ramchain_prefetch(coin,&spentbp->ramchain);