Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
192dfa62e3
  1. 2
      iguana/iguana777.c
  2. 3
      iguana/iguana_unspents.c

2
iguana/iguana777.c

@ -378,7 +378,7 @@ int32_t iguana_utxogen(struct iguana_info *coin,int32_t helperid,int32_t convert
{ {
if ( (bp= coin->bundles[hdrsi]) == 0 ) if ( (bp= coin->bundles[hdrsi]) == 0 )
return(-1); return(-1);
printf("validate and gen utxo.[%d] Xspends.%p\n",hdrsi,bp->ramchain.Xspendinds); printf("validate incr.%d and gen utxo.[%d] utxofinish.%u Xspends.%p\n",incr,hdrsi,bp->utxofinish,bp->ramchain.Xspendinds);
if ( strcmp("BTC",coin->symbol) == 0 || iguana_bundlevalidate(coin,bp,0) == bp->n ) if ( strcmp("BTC",coin->symbol) == 0 || iguana_bundlevalidate(coin,bp,0) == bp->n )
{ {
retval = 0; retval = 0;

3
iguana/iguana_unspents.c

@ -942,7 +942,7 @@ int32_t iguana_spendvectors(struct iguana_info *coin,struct iguana_bundle *bp,st
uint32_t spent_unspentind,spent_pkind,now,starttime; struct iguana_ramchaindata *rdata; uint32_t spent_unspentind,spent_pkind,now,starttime; struct iguana_ramchaindata *rdata;
struct iguana_bundle *spentbp; struct iguana_blockRO *B; struct iguana_spendvector *ptr; struct iguana_bundle *spentbp; struct iguana_blockRO *B; struct iguana_spendvector *ptr;
struct iguana_unspent *u,*spentU; struct iguana_txid *T; char str[65]; struct iguana_spend *S,*s; struct iguana_unspent *u,*spentU; struct iguana_txid *T; char str[65]; struct iguana_spend *S,*s;
//printf("iguana_spendvectors.[%d] gen.%d ramchain data.%p\n",bp->hdrsi,bp->bundleheight,ramchain->H.data); printf("iguana_spendvectors.[%d] gen.%d ramchain data.%p\n",bp->hdrsi,bp->bundleheight,ramchain->H.data);
if ( (rdata= ramchain->H.data) == 0 || (n= rdata->numspends) < 1 ) if ( (rdata= ramchain->H.data) == 0 || (n= rdata->numspends) < 1 )
{ {
printf("iguana_spendvectors: no rdata.%p %d\n",rdata,n); printf("iguana_spendvectors: no rdata.%p %d\n",rdata,n);
@ -1980,6 +1980,7 @@ int32_t iguana_bundlevalidate(struct iguana_info *coin,struct iguana_bundle *bp,
static int32_t totalerrs,totalvalidated; static int32_t totalerrs,totalvalidated;
FILE *fp; char fname[1024]; uint8_t *blockspace; uint32_t now = (uint32_t)time(NULL); FILE *fp; char fname[1024]; uint8_t *blockspace; uint32_t now = (uint32_t)time(NULL);
int32_t i,max,len,errs = 0; int64_t total = 0; int32_t i,max,len,errs = 0; int64_t total = 0;
printf("validate.[%d]\n",bp->hdrsi);
if ( bp->validated <= 1 || forceflag != 0 ) if ( bp->validated <= 1 || forceflag != 0 )
{ {
sprintf(fname,"%s/%s/validated/%d",GLOBAL_DBDIR,coin->symbol,bp->bundleheight); sprintf(fname,"%s/%s/validated/%d",GLOBAL_DBDIR,coin->symbol,bp->bundleheight);

Loading…
Cancel
Save