Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
e5fff5d779
  1. 5
      iguana/iguana777.c
  2. 8
      iguana/iguana_bundles.c
  3. 3
      iguana/iguana_unspents.c

5
iguana/iguana777.c

@ -394,7 +394,10 @@ 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++)
// iguana_allocvolatile(coin,&coin->bundles[hdrsi]->ramchain); // iguana_allocvolatile(coin,&coin->bundles[hdrsi]->ramchain);
for (hdrsi=coin->balanceswritten; hdrsi<max; hdrsi++,coin->balanceswritten++) if ( coin->origbalanceswritten <= 1 )
hdrsi = 0;
else hdrsi = coin->origbalanceswritten;
for (; hdrsi<max; hdrsi++,coin->balanceswritten++)
iguana_balancegen(coin,0,coin->bundles[hdrsi],0,coin->chain->bundlesize-1); iguana_balancegen(coin,0,coin->bundles[hdrsi],0,coin->chain->bundlesize-1);
if ( iguana_balanceflush(coin,max) > 0 ) if ( iguana_balanceflush(coin,max) > 0 )
printf("balanceswritten.%d flushed bp->hdrsi %d vs %d coin->longestchain/coin->chain->bundlesize\n",coin->balanceswritten,bp->hdrsi,coin->longestchain/coin->chain->bundlesize); printf("balanceswritten.%d flushed bp->hdrsi %d vs %d coin->longestchain/coin->chain->bundlesize\n",coin->balanceswritten,bp->hdrsi,coin->longestchain/coin->chain->bundlesize);

8
iguana/iguana_bundles.c

@ -517,10 +517,10 @@ int32_t iguana_bundleissuemissing(struct iguana_info *coin,struct iguana_bundle
lag = aveduration * mult; lag = aveduration * mult;
if ( coin->PREFETCHLAG < 0 ) if ( coin->PREFETCHLAG < 0 )
{ {
if ( bp != coin->current ) if ( bp != coin->current && lag < 60 )
lag = 20; lag = 60;
else if ( lag < 10 ) else if ( lag < 30 )
lag = 10; lag = 30;
} }
else if ( lag < 120 && coin->enableCACHE == 0 ) else if ( lag < 120 && coin->enableCACHE == 0 )
{ {

3
iguana/iguana_unspents.c

@ -1164,6 +1164,7 @@ int32_t iguana_balancegen(struct iguana_info *coin,int32_t incremental,struct ig
} }
} }
else continue; else continue;
spentbp = 0;
if ( spent_unspentind > 0 && spent_pkind > 0 && (spentbp= coin->bundles[spent_hdrsi]) != 0 ) if ( spent_unspentind > 0 && spent_pkind > 0 && (spentbp= coin->bundles[spent_hdrsi]) != 0 )
{ {
if ( iguana_volatileupdate(coin,0,&spentbp->ramchain,spent_hdrsi,spent_unspentind,spent_pkind,spent_value,spendind,h) < 0 ) if ( iguana_volatileupdate(coin,0,&spentbp->ramchain,spent_hdrsi,spent_unspentind,spent_pkind,spent_value,spendind,h) < 0 )
@ -1172,7 +1173,7 @@ int32_t iguana_balancegen(struct iguana_info *coin,int32_t incremental,struct ig
else else
{ {
errs++; errs++;
printf("iguana_balancegen: error with unspentind.%d [%d]\n",spent_unspentind,spent_hdrsi); printf("iguana_balancegen: error spentbp.%p with unspentind.%d [%d]\n",spentbp,spent_unspentind,spent_hdrsi);
} }
} }
} }

Loading…
Cancel
Save