Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
57e0b00c59
  1. 2
      iguana/iguana777.c
  2. 4
      iguana/iguana777.h
  3. 2
      iguana/iguana_ramchain.c
  4. 2
      iguana/iguana_tx.c
  5. 6
      iguana/iguana_unspents.c
  6. 4
      iguana/main.c

2
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

4
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

2
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;
}

2
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);

6
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;

4
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";

Loading…
Cancel
Save