Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
162dded001
  1. 6
      iguana/iguana777.c
  2. 1
      iguana/iguana777.h
  3. 2
      iguana/iguana_blocks.c
  4. 10
      iguana/iguana_unspents.c

6
iguana/iguana777.c

@ -471,6 +471,12 @@ void iguana_helper(void *arg)
if ( coin->polltimeout < polltimeout ) if ( coin->polltimeout < polltimeout )
polltimeout = coin->polltimeout; polltimeout = coin->polltimeout;
//printf("call spendvectors.%d\n",bp->hdrsi); //printf("call spendvectors.%d\n",bp->hdrsi);
if ( coin->PREFETCHLAG > 0 )
{
iguana_ramchain_prefetch(coin,&bp->ramchain,0);
if ( bp->hdrsi > 0 )
iguana_prefetch(coin,bp,bp->hdrsi-1,1);
}
if ( (retval= iguana_spendvectors(coin,bp,&bp->ramchain,0,bp->n,0)) >= 0 ) if ( (retval= iguana_spendvectors(coin,bp,&bp->ramchain,0,bp->n,0)) >= 0 )
{ {
flag++; flag++;

1
iguana/iguana777.h

@ -851,6 +851,7 @@ int32_t iguana_bundleissuemissing(struct iguana_info *coin,struct iguana_bundle
int32_t iguana_blocksmissing(struct iguana_info *coin,int32_t *nonzp,uint8_t missings[IGUANA_MAXBUNDLESIZE/8+1],bits256 hashes[],double mult,struct iguana_bundle *bp,int32_t capacity); int32_t iguana_blocksmissing(struct iguana_info *coin,int32_t *nonzp,uint8_t missings[IGUANA_MAXBUNDLESIZE/8+1],bits256 hashes[],double mult,struct iguana_bundle *bp,int32_t capacity);
FILE *myfopen(char *fname,char *mode); FILE *myfopen(char *fname,char *mode);
int32_t myfclose(FILE *fp); int32_t myfclose(FILE *fp);
void iguana_prefetch(struct iguana_info *coin,struct iguana_bundle *bp,int32_t width,int32_t flags);
extern int32_t HDRnet,netBLOCKS; extern int32_t HDRnet,netBLOCKS;

2
iguana/iguana_blocks.c

@ -328,7 +328,7 @@ struct iguana_block *_iguana_chainlink(struct iguana_info *coin,struct iguana_bl
else else
{ {
char str[65]; char str[65];
if ( bits256_nonz(block->RO.prev_block) != 0 ) if ( 0 && bits256_nonz(block->RO.prev_block) != 0 )
printf("chainlink error: cant find prev.(%s)\n",bits256_str(str,block->RO.prev_block)); printf("chainlink error: cant find prev.(%s)\n",bits256_str(str,block->RO.prev_block));
iguana_blockunmark(coin,block,0,-1,0); iguana_blockunmark(coin,block,0,-1,0);
//memset(&block->RO.prev_block.bytes,0,sizeof(block->RO.prev_block)); //memset(&block->RO.prev_block.bytes,0,sizeof(block->RO.prev_block));

10
iguana/iguana_unspents.c

@ -817,12 +817,6 @@ int32_t iguana_spendvectors(struct iguana_info *coin,struct iguana_bundle *bp,st
if ( strcmp(coin->symbol,"BTC") == 0 ) if ( strcmp(coin->symbol,"BTC") == 0 )
printf("start UTXOGEN.%d max.%d ptr.%p millis.%.3f\n",bp->bundleheight,n,ptr,startmillis); printf("start UTXOGEN.%d max.%d ptr.%p millis.%.3f\n",bp->bundleheight,n,ptr,startmillis);
//txidind = spendind = rdata->firsti; //txidind = spendind = rdata->firsti;
if ( coin->PREFETCHLAG > 0 )
{
iguana_ramchain_prefetch(coin,ramchain,0);
if ( bp->hdrsi > 0 )
iguana_prefetch(coin,bp,bp->hdrsi-1,1);
}
starttime = (uint32_t)time(NULL); starttime = (uint32_t)time(NULL);
txidind = B[starti].firsttxidind; txidind = B[starti].firsttxidind;
spendind = B[starti].firstvin; spendind = B[starti].firstvin;
@ -862,7 +856,7 @@ int32_t iguana_spendvectors(struct iguana_info *coin,struct iguana_bundle *bp,st
} }
if ( coin->PREFETCHLAG > 0 && now >= spentbp->lastprefetch+coin->PREFETCHLAG ) if ( coin->PREFETCHLAG > 0 && now >= spentbp->lastprefetch+coin->PREFETCHLAG )
{ {
//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,2); iguana_ramchain_prefetch(coin,&spentbp->ramchain,2);
spentbp->lastprefetch = now; spentbp->lastprefetch = now;
} }
@ -1611,7 +1605,7 @@ int32_t iguana_spendvectorconvs(struct iguana_info *coin,struct iguana_bundle *s
spent_hdrsi = spentbp->hdrsi; spent_hdrsi = spentbp->hdrsi;
ramchain = (spentbp == coin->current) ? &coin->RTramchain : &spentbp->ramchain; ramchain = (spentbp == coin->current) ? &coin->RTramchain : &spentbp->ramchain;
numpkinds = ramchain->H.data->numpkinds; numpkinds = ramchain->H.data->numpkinds;
iguana_ramchain_prefetch(coin,&spentbp->ramchain,0); iguana_ramchain_prefetch(coin,ramchain,0);
spentU = (void *)(long)((long)ramchain->H.data + ramchain->H.data->Uoffset); spentU = (void *)(long)((long)ramchain->H.data + ramchain->H.data->Uoffset);
for (i=converted=0; i<n; i++) for (i=converted=0; i<n; i++)
{ {

Loading…
Cancel
Save