diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index bf2812144..35a930c8e 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -452,7 +452,7 @@ int32_t iguana_bundlekick(struct iguana_info *coin,struct iguana_bundle *bp,int3 int32_t iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int32_t timelimit) { - int32_t i,r,range,starti,lasti,numhashes,issued,valid,max,counter = 0; struct iguana_block *block; double endmillis,width; struct iguana_bundle *prevbp; uint32_t starttime; + int32_t i,r,range,starti,lasti,numhashes,issued,valid,max,counter = 0; struct iguana_block *block; double endmillis,width; struct iguana_bundle *prevbp,*lastbp; uint32_t starttime; if ( (range= coin->peers.numranked) > coin->MAXBUNDLES ) range = coin->MAXBUNDLES; starti = coin->current == 0 ? 0 : coin->current->hdrsi; @@ -621,6 +621,8 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int // merkle printf(">>>>>>>>>>>>>>>>>>>>>>> EMIT bundle.%d | 1st.%d h.%d s.[%d] maxbundles.%d NET.(h%d b%d)\n",bp->bundleheight,coin->current!=0?coin->current->hdrsi:-1,coin->current!=0?coin->current->numhashes:-1,coin->current!=0?coin->current->numsaved:-1,coin->MAXBUNDLES,HDRnet,netBLOCKS); bp->emitfinish = 1; + if ( (lastbp= coin->lastpending) != 0 && lastbp->hdrsi < coin->bundlescount-1 ) + coin->lastpending = coin->bundles[lastbp->hdrsi + 1]; if ( (rand() % 2) == 0 ) { if ( coin->MAXBUNDLES > IGUANA_MINPENDBUNDLES )