|
@ -851,21 +851,25 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru |
|
|
counter = iguana_bundleissue(coin,bp,max,timelimit); |
|
|
counter = iguana_bundleissue(coin,bp,max,timelimit); |
|
|
if ( bp->hdrsi == starti && counter > 0 ) |
|
|
if ( bp->hdrsi == starti && counter > 0 ) |
|
|
printf("ITER now.%u spec.%-4d bundle.%-4d h.%-4d r.%-4d s.%-4d F.%d T.%d issued.%d mb.%d/%d\n",(uint32_t)time(NULL),bp->numspec,bp->bundleheight/coin->chain->bundlesize,bp->numhashes,bp->numrecv,bp->numsaved,bp->emitfinish,timelimit,counter,coin->MAXBUNDLES,coin->bundlescount); |
|
|
printf("ITER now.%u spec.%-4d bundle.%-4d h.%-4d r.%-4d s.%-4d F.%d T.%d issued.%d mb.%d/%d\n",(uint32_t)time(NULL),bp->numspec,bp->bundleheight/coin->chain->bundlesize,bp->numhashes,bp->numrecv,bp->numsaved,bp->emitfinish,timelimit,counter,coin->MAXBUNDLES,coin->bundlescount); |
|
|
for (bundlei=0; bundlei<bp->n; bundlei++) |
|
|
if ( coin->blocks.hwmchain.height > coin->chain->bundlesize && bp->hdrsi == coin->blocks.hwmchain.height/coin->chain->bundlesize ) |
|
|
{ |
|
|
{ |
|
|
checki = iguana_peerfname(coin,&hdrsi,GLOBALTMPDIR,fname,0,bp->hashes[bundlei],bundlei>0?bp->hashes[bundlei-1]:zero,1); |
|
|
for (bundlei=0; bundlei<bp->n; bundlei++) |
|
|
if ( checki == bundlei ) |
|
|
|
|
|
{ |
|
|
{ |
|
|
if ( (fp= fopen(fname,"rb")) != 0 ) |
|
|
checki = iguana_peerfname(coin,&hdrsi,GLOBALTMPDIR,fname,0,bp->hashes[bundlei],bundlei>0?bp->hashes[bundlei-1]:zero,1); |
|
|
fclose(fp); |
|
|
if ( checki == bundlei ) |
|
|
else break; |
|
|
{ |
|
|
|
|
|
if ( (fp= fopen(fname,"rb")) != 0 ) |
|
|
|
|
|
fclose(fp); |
|
|
|
|
|
else break; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if ( bp == coin->current && (bp->ramchain.H.data == 0 || bp->ramchain.H.data->numblocks != bundlei) ) |
|
|
if ( bp == coin->current && (bp->ramchain.H.data == 0 || bp->ramchain.H.data->numblocks != bundlei) ) |
|
|
|
|
|
{ |
|
|
|
|
|
if ( iguana_bundlesaveHT(coin,mem,memB,bp,(uint32_t)time(NULL)) == 0 ) |
|
|
|
|
|
{ |
|
|
{ |
|
|
|
|
|
printf("RT bundls\n"); |
|
|
|
|
|
if ( iguana_bundlesaveHT(coin,mem,memB,bp,(uint32_t)time(NULL)) == 0 ) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|