From 57e0b00c59524d5a89d593c283a3bbda698b6e40 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 19 Apr 2016 02:39:16 -0500 Subject: [PATCH] test --- iguana/iguana777.c | 2 +- iguana/iguana777.h | 4 ++++ iguana/iguana_ramchain.c | 2 +- iguana/iguana_tx.c | 2 +- iguana/iguana_unspents.c | 6 +++--- iguana/main.c | 4 ++-- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/iguana/iguana777.c b/iguana/iguana777.c index e69b86971..a7a789aea 100755 --- a/iguana/iguana777.c +++ b/iguana/iguana777.c @@ -698,7 +698,7 @@ struct iguana_info *iguana_setcoin(char *symbol,void *launched,int32_t maxpeers, // maxval = (int32_t)coin->MAXMEM; coin->MAXMEM *= (1024L * 1024 * 1024); #ifdef __PNACL__ - //maxval = 8;// * (strcmp("BTC",coin->symbol) != 0) + 8; + maxval = 1;// * (strcmp("BTC",coin->symbol) != 0) + 8; //if ( mult > 1 ) // mult /= 2; #endif diff --git a/iguana/iguana777.h b/iguana/iguana777.h index 29522a663..0293f5ba4 100755 --- a/iguana/iguana777.h +++ b/iguana/iguana777.h @@ -26,7 +26,11 @@ typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t #define IGUANA_SERIALIZE_SPENDVECTORGEN //#define IGUANA_DISABLEPEERS #define _IGUANA_MAXSTUCKTIME 10 +#ifdef __PNACL__ +#define IGUANA_MAXITERATIONS 77 +#else #define IGUANA_MAXITERATIONS 10000 +#endif #define IGUANA_DEFAULTLAG 30 #define IGUANA_MAXCOINS 64 diff --git a/iguana/iguana_ramchain.c b/iguana/iguana_ramchain.c index b8eba298b..c2a11a89c 100755 --- a/iguana/iguana_ramchain.c +++ b/iguana/iguana_ramchain.c @@ -653,7 +653,7 @@ void *iguana_ramchain_offset(char *fname,void *dest,uint8_t *lhash,FILE *fp,uint fseek(fp,startfpos,SEEK_SET); if ( (err= fwrite(srcptr,1,len,fp)) == len ) { - if ( i > 2 ) + //if ( i > 2 ) printf("write.%d of %d worked!\n",i+1,numretries+1); break; } diff --git a/iguana/iguana_tx.c b/iguana/iguana_tx.c index 1268064b4..24cf237f2 100755 --- a/iguana/iguana_tx.c +++ b/iguana/iguana_tx.c @@ -227,7 +227,7 @@ int32_t iguana_peerblockrequest(struct iguana_info *coin,uint8_t *blockspace,int return(iguana_queue_send(coin,addr,0,blockspace,"block",total,0,0)); else { - printf("validated.[%d:%d] len.%d\n",bp->hdrsi,bundlei,total); + //printf("validated.[%d:%d] len.%d\n",bp->hdrsi,bundlei,total); return(total); } } else printf("iguana_peerblockrequest: error merkle cmp tx.[%d] for ht.%d\n",i,bp->bundleheight+bundlei); diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index b8272fcb0..f40daeebb 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -972,7 +972,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; 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; - printf("iguana_spendvectors.[%d] gen.%d ramchain data.%p txbits.%p\n",bp->hdrsi,bp->bundleheight,ramchain->H.data,ramchain->txbits); + //printf("iguana_spendvectors.[%d] gen.%d ramchain data.%p txbits.%p\n",bp->hdrsi,bp->bundleheight,ramchain->H.data,ramchain->txbits); if ( (rdata= ramchain->H.data) == 0 || (n= rdata->numspends) < 1 ) { printf("iguana_spendvectors: no rdata.%p %d\n",rdata,n); @@ -987,13 +987,13 @@ int32_t iguana_spendvectors(struct iguana_info *coin,struct iguana_bundle *bp,st bp->numtmpspends = ramchain->numXspends; bp->utxofinish = (uint32_t)time(NULL); bp->balancefinish = 0; - printf("iguana_spendvectors.[%d]: already have Xspendinds[%d]\n",bp->hdrsi,ramchain->numXspends); + //printf("iguana_spendvectors.[%d]: already have Xspendinds[%d]\n",bp->hdrsi,ramchain->numXspends); return(0); } ptr = mycalloc('x',sizeof(*ptr),n); total += n; startmillis = OS_milliseconds(); - //if ( 0 && strcmp(coin->symbol,"BTC") == 0 ) + if ( 0 && strcmp(coin->symbol,"BTC") == 0 ) printf("start UTXOGEN.%d max.%d ptr.%p millis.%.3f\n",bp->bundleheight,n,ptr,startmillis); starttime = (uint32_t)time(NULL); txidind = B[starti].firsttxidind; diff --git a/iguana/main.c b/iguana/main.c index 6262da06b..30f26ad67 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -68,12 +68,12 @@ int32_t HDRnet,netBLOCKS; cJSON *API_json; #ifdef __PNACL__ -char GLOBAL_TMPDIR[512] = "/tmp"; +char GLOBAL_TMPDIR[512] = "/DB/tmp"; char GLOBAL_DBDIR[512] = "/DB"; char GLOBAL_HELPDIR[512] = "/DB/help"; char GLOBAL_VALIDATEDIR[512] = "/DB/purgeable"; char GLOBAL_CONFSDIR[512] = "/DB/confs"; -int32_t IGUANA_NUMHELPERS = 3; +int32_t IGUANA_NUMHELPERS = 1; #else char GLOBAL_TMPDIR[512] = "tmp"; char GLOBAL_HELPDIR[512] = "help";