Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
d737e9115f
  1. 2
      iguana/iguana777.h
  2. 8
      iguana/iguana_unspents.c

2
iguana/iguana777.h

@ -23,7 +23,7 @@
typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t len);
#define IGUANA_MAXSCRIPTSIZE 10001
//#define IGUANA_SERIALIZE_SPENDVECTORGEN
#define IGUANA_SERIALIZE_SPENDVECTORGEN
//#define IGUANA_SERIALIZE_BALANCEGEN
//#define IGUANA_DISABLEPEERS
#define _IGUANA_MAXSTUCKTIME 300

8
iguana/iguana_unspents.c

@ -680,7 +680,7 @@ int32_t iguana_spendvectors(struct iguana_info *coin,struct iguana_bundle *bp)
printf("start UTXOGEN.%d max.%d ptr.%p\n",bp->bundleheight,n,ptr);
txidind = spendind = rdata->firsti;
iguana_ramchain_prefetch(coin,ramchain);
iguana_prefetch(coin,bp);
//iguana_prefetch(coin,bp);
starttime = (uint32_t)time(NULL);
for (i=0; i<bp->n; i++)
{
@ -715,7 +715,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);
errs++;
}
if ( 1 && now > spentbp->lastprefetch+10 )
if ( 0 && now > spentbp->lastprefetch+10 )
{
//printf("prefetch[%d] from.[%d] lag.%d\n",spentbp->hdrsi,bp->hdrsi,now - spentbp->lastprefetch);
iguana_ramchain_prefetch(coin,&spentbp->ramchain);
@ -952,7 +952,7 @@ int32_t iguana_RTutxo(struct iguana_info *coin,struct iguana_bundle *bp,struct i
return(-1);
}
rdata = spentbp->ramchain.H.data;
if ( 1 && now > spentbp->lastprefetch+10 )
if ( 0 && now > spentbp->lastprefetch+10 )
{
//printf("RT prefetch[%d] from.[%d] lag.%d\n",spentbp->hdrsi,bp->hdrsi,now - spentbp->lastprefetch);
iguana_ramchain_prefetch(coin,&spentbp->ramchain);
@ -1222,7 +1222,7 @@ void iguana_RTramchainalloc(struct iguana_info *coin,struct iguana_bundle *bp)
dest->H.txidind = dest->H.unspentind = dest->H.spendind = dest->pkind = dest->H.data->firsti;
dest->externalind = dest->H.stacksize = 0;
dest->H.scriptoffset = 1;
iguana_prefetch(coin,bp);
//iguana_prefetch(coin,bp);
}
}

Loading…
Cancel
Save