Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
3be0a14b04
  1. 2
      iguana/iguana777.c
  2. 4
      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 incr.%d and gen utxo.[%d] utxofinish.%u Xspends.%p\n",incr,hdrsi,bp->utxofinish,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;

4
iguana/iguana_unspents.c

@ -1979,7 +1979,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); //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);
@ -1991,7 +1991,7 @@ int32_t iguana_bundlevalidate(struct iguana_info *coin,struct iguana_bundle *bp,
{ {
printf("error reading.(%s)\n",fname); printf("error reading.(%s)\n",fname);
total = bp->validated = 0; total = bp->validated = 0;
} else printf("(%s) total.%d validated.%u\n",fname,(int32_t)total,bp->validated); } //else printf("(%s) total.%d validated.%u\n",fname,(int32_t)total,bp->validated);
} else OS_removefile(fname,1); } else OS_removefile(fname,1);
fclose(fp); fclose(fp);
} }

Loading…
Cancel
Save