diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index 6d52f6a15..64d165a2e 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -514,6 +514,8 @@ void iguana_bundlestats(struct iguana_info *coin,char *str) printf("%s\n",str); //myallocated(0,0); lastdisp = (uint32_t)time(NULL); + if ( firstgap != 0 && firstgap->queued == 0 ) + iguana_bundleQ(coin,firstgap,1000); } strcpy(coin->statusstr,str); coin->estsize = estsize; diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index a531ad011..f31665df8 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -468,11 +468,15 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int char str[64]; queue_enqueue("hdrsQ",&coin->hdrsQ,queueitem(bits256_str(str,bp->hashes[0])),1); } - else if ( time(NULL) > bp->lastspeculative+600 ) + else if ( time(NULL) > bp->lastspeculative+600 || (bp->hdrsi == starti && time(NULL) > bp->lastspeculative+90) ) { - for (i=1,counter=0; in; i++) - if ( bits256_nonz(bp->hashes[i]) == 0 && bits256_nonz(bp->speculative[i]) > 0 ) + for (i=1,counter=0; in && inumspec; i++) + { + if ( bp->speculative != 0 && bits256_nonz(bp->hashes[i]) == 0 && bits256_nonz(bp->speculative[i]) > 0 ) iguana_blockQ(coin,0,-1,bp->speculative[i],0), counter++; + else if ( bits256_nonz(bp->hashes[i]) != 0 ) + iguana_blockQ(coin,0,-1,bp->hashes[i],0), counter++; + } if ( counter != 0 ) printf("SPECULATIVE issue.%d bp.[%d]\n",counter,bp->hdrsi); bp->lastspeculative = (uint32_t)time(NULL); @@ -1273,14 +1277,15 @@ int32_t iguana_reqblocks(struct iguana_info *coin) } else*/ if ( bp->speculative != 0 && (bits256_cmp(bp->hashes[bundlei],bp->speculative[bundlei]) != 0 || (rand() % 100) == 0) ) { - if ( iguana_blockfind(coin,bp->speculative[bundlei]) == 0 ) + if ( time(NULL) > bp->issued[bundlei]+30 && iguana_blockfind(coin,bp->speculative[bundlei]) == 0 ) { bp->hashes[bundlei] = bp->speculative[bundlei]; struct iguana_bloominds bit = iguana_calcbloom(bp->speculative[bundlei]); if ( iguana_bloomfind(coin,&bp->bloom,0,bit) < 0 ) iguana_bloomset(coin,&bp->bloom,0,bit); - printf("speculative next %d\n",coin->blocks.hwmchain.height+1); + //printf("speculative next %d\n",coin->blocks.hwmchain.height+1); iguana_blockQ(coin,0,-1,bp->speculative[bundlei],0); + bp->issued[bundlei] = (uint32_t)time(NULL); } } }