Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
9a2aec1594
  1. 9
      iguana/iguana777.c
  2. 4
      iguana/iguana_tx.c

9
iguana/iguana777.c

@ -375,7 +375,7 @@ int32_t iguana_utxogen(struct iguana_info *coin,int32_t helperid,int32_t convert
if ( (bp= coin->bundles[hdrsi]) == 0 )
return(-1);
//printf("validate incr.%d and gen utxo.[%d] utxofinish.%u Xspends.%p\n",incr,hdrsi,bp->utxofinish,bp->ramchain.Xspendinds);
if ( iguana_bundlevalidate(coin,bp,0) == bp->n ) //strcmp("BTC",coin->symbol) == 0 ||
if ( iguana_bundlevalidate(coin,bp,0) == bp->n ) //strcmp("BTC",coin->symbol) == 0 ||
{
retval = 0;
if ( bp->utxofinish > 1 || (retval= iguana_spendvectors(coin,bp,&bp->ramchain,0,bp->n,convertflag)) >= 0 )
@ -388,6 +388,11 @@ int32_t iguana_utxogen(struct iguana_info *coin,int32_t helperid,int32_t convert
bp->utxofinish = (uint32_t)time(NULL);
} else printf("UTXO gen.[%d] utxo error\n",bp->hdrsi);
}
else
{
printf("error validating.[%d], restart iguana\n",bp->hdrsi);
exit(-1);
}
}
}
while ( (n= iguana_utxofinished(coin)) < max )
@ -446,7 +451,7 @@ int32_t iguana_utxogen(struct iguana_info *coin,int32_t helperid,int32_t convert
if ( iguana_bundlevalidate(coin,bp,0) != bp->n )
{
printf("validate.[%d] error. just refresh page or restart iguana\n",bp->hdrsi);
//exit(-1);
exit(-1);
}
}
while ( coin->spendvectorsaved == 1 )

4
iguana/iguana_tx.c

@ -25,13 +25,13 @@
int32_t iguana_scriptdata(struct iguana_info *coin,uint8_t *scriptspace,long fileptr[2],char *fname,uint32_t scriptpos,int32_t scriptlen)
{
FILE *fp; int32_t retval = scriptlen;
#ifndef __PNACL__
/*#ifndef __PNACL__
if ( fileptr[0] == 0 )
fileptr[0] = (uint64_t)OS_mapfile(fname,&fileptr[1],0);
if ( fileptr[0] != 0 && (scriptpos + scriptlen) <= fileptr[1] )
memcpy(scriptspace,(void *)(fileptr[0] + scriptpos),scriptlen);
else
#endif
#endif*/
if ( (fp= fopen(fname,"rb")) != 0 )
{
fseek(fp,scriptpos,SEEK_SET);

Loading…
Cancel
Save