Browse Source

test

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

2
iguana/iguana777.h

@ -432,7 +432,7 @@ struct iguana_bundle
{
struct queueitem DL; struct iguana_info *coin; struct iguana_bundle *nextbp;
struct iguana_bloom16 bloom; int64_t totaldurations,duplicatedurations; int32_t durationscount,duplicatescount;
uint32_t issuetime,hdrtime,emitfinish,mergefinish,purgetime,queued,startutxo,utxofinish,balancefinish,validated,lastspeculative,dirty,nexttime,currenttime,lastprefetch,lastRT,missingstime,unsticktime;
uint32_t issuetime,hdrtime,emitfinish,mergefinish,purgetime,queued,startutxo,utxofinish,balancefinish,validated,lastspeculative,dirty,nexttime,currenttime,lastprefetch,lastRT,missingstime,unsticktime,converted;
int32_t numhashes,numrecv,numsaved,numcached,generrs,currentflag,origmissings,numissued;
int32_t minrequests,n,hdrsi,bundleheight,numtxids,numspends,numunspents,numspec,isRT;
double avetime,threshold,metric; uint64_t datasize,estsize;

19
iguana/iguana_unspents.c

@ -1690,15 +1690,19 @@ int32_t iguana_spendvectorconvs(struct iguana_info *coin,struct iguana_bundle *r
for (j=0; j<bp->numtmpspends; j++)
{
vec = &bp->tmpspends[j];
if ( vec->hdrsi == refbp->hdrsi && iguana_spendvectorconv(coin,vec,bp) == 0 )
if ( vec->hdrsi == refbp->hdrsi )
{
printf("iguana_spendvectorconv error [%d] at %d of %d/%d\n",bp->hdrsi,j,bp->numtmpspends,n);
return(-1);
if ( iguana_spendvectorconv(coin,vec,bp) == 0 )
{
printf("iguana_spendvectorconv error [%d] at %d of %d/%d\n",bp->hdrsi,j,bp->numtmpspends,n);
return(-1);
} else converted++;
}
}
}
}
printf("spendvectorconvs.[%d] converted.%d\n",refbp->hdrsi,converted);
bp->converted = (uint32_t)time(NULL);
//printf("spendvectorconvs.[%d] converted.%d\n",refbp->hdrsi,converted);
return(0);
}
@ -1716,7 +1720,7 @@ int32_t iguana_balancecalc(struct iguana_info *coin,struct iguana_bundle *bp,int
{
if ( coin->origbalanceswritten <= 1 && coin->spendvectorsaved == 0 )
{
if ( bp->tmpspends != 0 && bp->ramchain.H.data != 0 && (n= bp->ramchain.H.data->numspends) != 0 )
if ( bp->tmpspends != 0 && bp->ramchain.H.data != 0 && (n= bp->ramchain.H.data->numspends) != 0 && bp->converted == 0 )
{
if ( iguana_spendvectorconvs(coin,bp) != 0 )
printf("error ram balancecalc.[%d]\n",bp->hdrsi);
@ -1727,9 +1731,12 @@ int32_t iguana_balancecalc(struct iguana_info *coin,struct iguana_bundle *bp,int
if ( coin->bundles[i] == 0 || coin->bundles[i]->emitfinish <= 1 )
break;
if ( i == n )
{
printf("balance calc.%d of %d\n",i,n);
iguana_spendvectorsaves(coin);
}
}
} else printf("error with invalid tmpspends.[%d]\n",bp->hdrsi), getchar();
} //else printf("error with invalid tmpspends.[%d]\n",bp->hdrsi), getchar();
} else retval = iguana_balancenormal(coin,bp,startheight,endheight);
if ( retval < 0 )
{

Loading…
Cancel
Save