Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
f6f0599afa
  1. 5
      iguana/iguana_bundles.c
  2. 4
      iguana/iguana_unspents.c

5
iguana/iguana_bundles.c

@ -599,10 +599,11 @@ int32_t iguana_bundlehdr(struct iguana_info *coin,struct iguana_bundle *bp,int32
int32_t counter=0;
if ( 0 && bp->isRT == 0 && (bp->hdrsi == coin->bundlescount-1 || bp == coin->current) )
printf("hdr ITERATE.%d bundle.%d vs %d: h.%d n.%d r.%d s.%d c.%d finished.%d spec.%p[%d]\n",bp->hdrsi,bp->bundleheight,coin->longestchain-coin->chain->bundlesize,bp->numhashes,bp->n,bp->numrecv,bp->numsaved,bp->numcached,bp->emitfinish,bp->speculative,bp->numspec);
if ( bp->hdrsi >= coin->bundlescount-2 || (coin->enableCACHE != 0 && bp->numhashes < bp->n && (bp->speculative == 0 || bp->hdrsi >= coin->longestchain/bp->n)) )
if ( time(NULL) > bp->hdrtime+30 && (bp->hdrsi >= coin->bundlescount-2 || (coin->enableCACHE != 0 && bp->numhashes < bp->n && (bp->speculative == 0 || bp->hdrsi >= coin->longestchain/bp->n))) )
{
char str[64];
//printf("hdrs.%s\n",bits256_str(str,bp->hashes[0]));
bp->hdrtime = (uint32_t)time(NULL);
printf("iguana_bundlehdr.%s\n",bits256_str(str,bp->hashes[0]));
queue_enqueue("hdrsQ",&coin->hdrsQ,queueitem(bits256_str(str,bp->hashes[0])),1);
}
if ( bp->hdrsi == coin->bundlescount-1 && bp->speculative != 0 && bits256_nonz(bp->nextbundlehash2) == 0 )

4
iguana/iguana_unspents.c

@ -724,7 +724,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 ( 0 && now > spentbp->lastprefetch+300 )
if ( 1 && now > spentbp->lastprefetch+300 )
{
printf("prefetch[%d] from.[%d] lag.%d\n",spentbp->hdrsi,bp->hdrsi,now - spentbp->lastprefetch);
iguana_ramchain_prefetch(coin,&spentbp->ramchain);
@ -1465,7 +1465,7 @@ int32_t iguana_balanceflush(struct iguana_info *coin,int32_t refhdrsi,int32_t pu
printf("error mapping bundle.[%d]\n",hdrsi);
}
char str[65]; printf("BALANCES WRITTEN for %d/%d bundles %s\n",coin->balanceswritten,coin->origbalanceswritten,bits256_str(str,coin->balancehash));
if ( strcmp(coin->symbol,"BTC") == 0 && coin->balanceswritten > coin->balanceswritten+10 )
if ( strcmp(coin->symbol,"BTC") == 0 && coin->balanceswritten > coin->origbalanceswritten+10 )
{
int32_t i;
coin->active = 0;

Loading…
Cancel
Save