Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
fc42a95d3b
  1. 4
      iguana/iguana_ramchain.c
  2. 8
      iguana/iguana_unspents.c

4
iguana/iguana_ramchain.c

@ -669,12 +669,12 @@ int32_t iguana_ramchain_prefetch(struct iguana_info *coin,struct iguana_ramchain
if ( bits256_nonz(txid.txid) != 0 )
nonz++;
}
for (i=0; i<numexternal; i++)
/*for (i=0; i<numexternal; i++)
{
memcpy(&txid.txid,&X[i],sizeof(txid.txid));
if ( bits256_nonz(txid.txid) != 0 )
nonz++;
}
}*/
for (i=0; i<tlen; i++)
if ( TXbits[i] != 0 )
nonz++;

8
iguana/iguana_unspents.c

@ -673,7 +673,7 @@ void iguana_unspents(struct supernet_info *myinfo,struct iguana_info *coin,cJSON
free(rmdarray);
}
void iguana_prefetch(struct iguana_info *coin,struct iguana_bundle *bp,int32_t width,int32_t txonly)
void iguana_prefetch(struct iguana_info *coin,struct iguana_bundle *bp,int32_t width,int32_t flags)
{
int32_t i; struct iguana_bundle *spentbp; uint32_t starttime = (uint32_t)time(NULL);
if ( bp->hdrsi > width )
@ -683,7 +683,7 @@ void iguana_prefetch(struct iguana_info *coin,struct iguana_bundle *bp,int32_t w
{
if ( (spentbp= coin->bundles[bp->hdrsi - i]) != 0 )
{
iguana_ramchain_prefetch(coin,&spentbp->ramchain,txonly);
iguana_ramchain_prefetch(coin,&spentbp->ramchain,flags);
spentbp->lastprefetch = starttime;
}
}
@ -844,7 +844,7 @@ int32_t iguana_spendvectors(struct iguana_info *coin,struct iguana_bundle *bp)
}
if ( coin->balanceswritten > 1 )
{
if ( 0 && 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);
iguana_ramchain_prefetch(coin,&spentbp->ramchain,2);
@ -1375,7 +1375,7 @@ void iguana_RTramchainalloc(struct iguana_info *coin,struct iguana_bundle *bp)
if ( coin->PREFETCHLAG != 0 )
{
iguana_ramchain_prefetch(coin,&coin->RTramchain,0);
iguana_prefetch(coin,bp,7,2);
iguana_prefetch(coin,bp,coin->bundlescount,1);
}
}
}

Loading…
Cancel
Save