Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
9c0bfac306
  1. 4
      iguana/iguana_recv.c
  2. 4
      iguana/iguana_unspents.c

4
iguana/iguana_recv.c

@ -636,7 +636,7 @@ struct iguana_bundle *iguana_bundleset(struct iguana_info *coin,struct iguana_bl
iguana_bundlehash2add(coin,0,bp,bundlei,hash2); iguana_bundlehash2add(coin,0,bp,bundlei,hash2);
if ( bp->emitfinish == 0 ) if ( bp->emitfinish == 0 )
{ {
if ( 0 && bits256_nonz(block->RO.hash2) != 0 && block->fpipbits == 0 ) if ( bp->hdrsi == coin->longestchain/bp->n && bits256_nonz(block->RO.hash2) != 0 && block->fpipbits == 0 )
{ {
block->fpos = -1; block->fpos = -1;
checki = iguana_peerfname(coin,&hdrsi,GLOBALTMPDIR,fname,0,block->RO.hash2,zero,1,0); checki = iguana_peerfname(coin,&hdrsi,GLOBALTMPDIR,fname,0,block->RO.hash2,zero,1,0);
@ -647,7 +647,7 @@ struct iguana_bundle *iguana_bundleset(struct iguana_info *coin,struct iguana_bl
block->fpipbits = 1; block->fpipbits = 1;
block->txvalid = 1; block->txvalid = 1;
block->fpos = 0; block->fpos = 0;
//printf("initialize with fp.[%d:%d] len.%d\n",hdrsi,bundlei,block->RO.recvlen); printf("initialize with fp.[%d:%d] len.%d\n",hdrsi,bundlei,block->RO.recvlen);
fclose(fp); fclose(fp);
} }
} else iguana_blockQ("bundleset",coin,bp,bundlei,block->RO.hash2,coin->current == 0 || bp->hdrsi <= coin->current->hdrsi+coin->MAXBUNDLES); } else iguana_blockQ("bundleset",coin,bp,bundlei,block->RO.hash2,coin->current == 0 || bp->hdrsi <= coin->current->hdrsi+coin->MAXBUNDLES);

4
iguana/iguana_unspents.c

@ -724,7 +724,7 @@ int32_t iguana_spendvectors(struct iguana_info *coin,struct iguana_bundle *bp)
printf("unexpected spendbp: height.%d bp.[%d] U%d <- S%d.[%d] [ext.%d %s prev.%d]\n",bp->bundleheight+i,spentbp->hdrsi,spent_unspentind,spendind,bp->hdrsi,s->external,bits256_str(str,prevhash),s->prevout); printf("unexpected spendbp: height.%d bp.[%d] U%d <- S%d.[%d] [ext.%d %s prev.%d]\n",bp->bundleheight+i,spentbp->hdrsi,spent_unspentind,spendind,bp->hdrsi,s->external,bits256_str(str,prevhash),s->prevout);
errs++; errs++;
} }
if ( now > spentbp->lastprefetch+300 ) if ( 0 && now > spentbp->lastprefetch+300 )
{ {
printf("prefetch[%d] from.[%d] lag.%d\n",spentbp->hdrsi,bp->hdrsi,now - spentbp->lastprefetch); printf("prefetch[%d] from.[%d] lag.%d\n",spentbp->hdrsi,bp->hdrsi,now - spentbp->lastprefetch);
iguana_ramchain_prefetch(coin,&spentbp->ramchain); iguana_ramchain_prefetch(coin,&spentbp->ramchain);
@ -959,7 +959,7 @@ int32_t iguana_RTutxo(struct iguana_info *coin,struct iguana_bundle *bp,struct i
if ( (++num % 1000) == 0 ) if ( (++num % 1000) == 0 )
printf("externalspents.[%d] ave %.2f micros, total %.2f seconds\n",num,(totalmillis*1000.)/num,totalmillis/1000.); printf("externalspents.[%d] ave %.2f micros, total %.2f seconds\n",num,(totalmillis*1000.)/num,totalmillis/1000.);
rdata = spentbp->ramchain.H.data; rdata = spentbp->ramchain.H.data;
if ( now > spentbp->lastprefetch+60 ) if ( 0 && now > spentbp->lastprefetch+60 )
{ {
printf("RT prefetch[%d] from.[%d] lag.%d\n",spentbp->hdrsi,bp->hdrsi,now - spentbp->lastprefetch); printf("RT prefetch[%d] from.[%d] lag.%d\n",spentbp->hdrsi,bp->hdrsi,now - spentbp->lastprefetch);
iguana_ramchain_prefetch(coin,&spentbp->ramchain); iguana_ramchain_prefetch(coin,&spentbp->ramchain);

Loading…
Cancel
Save