From 9a2aec1594c0d6aa1cceb6f5781dbe27eee808cd Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 19 Apr 2016 14:10:48 -0500 Subject: [PATCH] test --- iguana/iguana777.c | 9 +++++++-- iguana/iguana_tx.c | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/iguana/iguana777.c b/iguana/iguana777.c index c6cdf65da..24ea249b8 100755 --- a/iguana/iguana777.c +++ b/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 ) diff --git a/iguana/iguana_tx.c b/iguana/iguana_tx.c index 24cf237f2..c1f010c43 100755 --- a/iguana/iguana_tx.c +++ b/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);