Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
269b6e5a59
  1. 6
      iguana/iguana777.c
  2. 2
      iguana/iguana_bundles.c
  3. 12
      iguana/iguana_unspents.c

6
iguana/iguana777.c

@ -387,15 +387,13 @@ int32_t iguana_utxogen(struct iguana_info *coin,int32_t helperid,int32_t convert
for (hdrsi=0; hdrsi<max; hdrsi++) for (hdrsi=0; hdrsi<max; hdrsi++)
coin->bundles[hdrsi]->converted = (uint32_t)time(NULL); coin->bundles[hdrsi]->converted = (uint32_t)time(NULL);
} }
while ( convertflag == 0 && (n= iguana_convertfinished(coin)) < max ) while ( (n= iguana_convertfinished(coin)) < max )
{ {
printf("helperid.%d convertfinished.%d vs max %d bundlescount.%d\n",helperid,n,max,coin->bundlescount); printf("helperid.%d convertfinished.%d vs max %d bundlescount.%d\n",helperid,n,max,coin->bundlescount);
sleep(3); sleep(3);
} }
if ( iguana_spendvectorsaves(coin) == 0 ) if ( iguana_spendvectorsaves(coin) == 0 )
{ {
//for (hdrsi=0; hdrsi<max; hdrsi++)
// iguana_allocvolatile(coin,&coin->bundles[hdrsi]->ramchain);
if ( coin->origbalanceswritten <= 1 ) if ( coin->origbalanceswritten <= 1 )
hdrsi = 0; hdrsi = 0;
else hdrsi = coin->origbalanceswritten; else hdrsi = coin->origbalanceswritten;
@ -440,7 +438,7 @@ void iguana_helper(void *arg)
if ( (coin= Coins[i]) != 0 ) if ( (coin= Coins[i]) != 0 )
{ {
if ( coin->spendvectorsaved == 1 ) if ( coin->spendvectorsaved == 1 )
iguana_utxogen(coin,helperid,coin->PREFETCHLAG >= 0); iguana_utxogen(coin,helperid,coin->PREFETCHLAG < 0);
} }
} }
//if ( (type & (1 << 0)) != 0 ) //if ( (type & (1 << 0)) != 0 )

2
iguana/iguana_bundles.c

@ -589,7 +589,7 @@ int32_t iguana_bundleissuemissing(struct iguana_info *coin,struct iguana_bundle
} }
} }
} }
if ( n > 0 ) if ( n > 0 && bp != coin->current )
printf("issue.[%d] %d priority.%d\n",bp->hdrsi,n,priority); printf("issue.[%d] %d priority.%d\n",bp->hdrsi,n,priority);
return(n); return(n);
} }

12
iguana/iguana_unspents.c

@ -983,14 +983,14 @@ int32_t iguana_spendvectors(struct iguana_info *coin,struct iguana_bundle *bp,st
errs++; errs++;
break; break;
} }
if ( 0 && 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);
spentbp->lastprefetch = now;
}
if ( convertflag != 0 ) if ( convertflag != 0 )
{ {
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);
spentbp->lastprefetch = now;
}
spentU = (void *)(long)((long)spentbp->ramchain.H.data + spentbp->ramchain.H.data->Uoffset); spentU = (void *)(long)((long)spentbp->ramchain.H.data + spentbp->ramchain.H.data->Uoffset);
u = &spentU[spent_unspentind]; u = &spentU[spent_unspentind];
if ( (spent_pkind= u->pkind) != 0 && spent_pkind < spentbp->ramchain.H.data->numpkinds ) if ( (spent_pkind= u->pkind) != 0 && spent_pkind < spentbp->ramchain.H.data->numpkinds )

Loading…
Cancel
Save