Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
fe96af5c91
  1. 4
      iguana/iguana_bundles.c

4
iguana/iguana_bundles.c

@ -851,6 +851,8 @@ 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);
if ( coin->blocks.hwmchain.height > coin->chain->bundlesize && bp->hdrsi == coin->blocks.hwmchain.height/coin->chain->bundlesize )
{
for (bundlei=0; bundlei<bp->n; bundlei++) for (bundlei=0; bundlei<bp->n; bundlei++)
{ {
checki = iguana_peerfname(coin,&hdrsi,GLOBALTMPDIR,fname,0,bp->hashes[bundlei],bundlei>0?bp->hashes[bundlei-1]:zero,1); checki = iguana_peerfname(coin,&hdrsi,GLOBALTMPDIR,fname,0,bp->hashes[bundlei],bundlei>0?bp->hashes[bundlei-1]:zero,1);
@ -863,12 +865,14 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru
} }
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) )
{ {
printf("RT bundls\n");
if ( iguana_bundlesaveHT(coin,mem,memB,bp,(uint32_t)time(NULL)) == 0 ) if ( iguana_bundlesaveHT(coin,mem,memB,bp,(uint32_t)time(NULL)) == 0 )
{ {
} }
} }
} }
}
iguana_bundleQ(coin,bp,1000); iguana_bundleQ(coin,bp,1000);
return(retval); return(retval);
} }

Loading…
Cancel
Save