Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
c837545e1a
  1. 2
      iguana/iguana777.h
  2. 2
      iguana/iguana_ramchain.c
  3. 4
      iguana/iguana_recv.c
  4. 5
      iguana/iguana_unspents.c

2
iguana/iguana777.h

@ -434,7 +434,7 @@ struct iguana_bundle
{
struct queueitem DL; struct iguana_info *coin; struct iguana_bundle *nextbp;
struct iguana_bloom16 bloom; int64_t totaldurations,duplicatedurations; int32_t durationscount,duplicatescount;
uint32_t issuetime,hdrtime,emitfinish,mergefinish,purgetime,queued,startutxo,utxofinish,balancefinish,validated,lastspeculative,dirty,nexttime,currenttime,lastprefetch,missingstime;
uint32_t issuetime,hdrtime,emitfinish,mergefinish,purgetime,queued,startutxo,utxofinish,balancefinish,validated,lastspeculative,dirty,nexttime,currenttime,lastprefetch,lastRT,missingstime;
int32_t numhashes,numrecv,numsaved,numcached,generrs,currentflag,origmissings,numissued;
int32_t minrequests,n,hdrsi,bundleheight,numtxids,numspends,numunspents,numspec,isRT;
double avetime,threshold,metric; uint64_t datasize,estsize;

2
iguana/iguana_ramchain.c

@ -1975,7 +1975,7 @@ void *iguana_bundlefile(struct iguana_info *coin,char *fname,long *filesizep,str
}
if ( (ptr= OS_mapfile(fname,filesizep,0)) == 0 )
{
printf("error mapping.(%s) bundlei.%d\n",fname,bundlei);
//printf("error mapping.(%s) bundlei.%d\n",fname,bundlei);
return(0);
}
return(ptr);

4
iguana/iguana_recv.c

@ -652,11 +652,13 @@ struct iguana_bundle *iguana_bundleset(struct iguana_info *coin,struct iguana_bl
block->fpipbits = 1;
block->txvalid = 1;
block->fpos = 0;
block->issued = (uint32_t)time(NULL);
printf("initialize with fp.[%d:%d] len.%d\n",hdrsi,bundlei,block->RO.recvlen);
fclose(fp);
}
else iguana_blockunmark(coin,block,bp,bundlei,1);
}
else if ( block->issued == 0 )
if ( block->issued == 0 )
iguana_blockQ("bundleset",coin,bp,bundlei,block->RO.hash2,coin->current == 0 || bp->hdrsi <= coin->current->hdrsi+coin->MAXBUNDLES);
//printf("bundlehashadd set.%d\n",bundlei);
if ( bundlei > 0 )

5
iguana/iguana_unspents.c

@ -1286,13 +1286,14 @@ int32_t iguana_realtime_update(struct iguana_info *coin)
struct iguana_bundle *bp; struct iguana_ramchaindata *rdata; int32_t bundlei,err,n,flag=0;
struct iguana_block *block=0; struct iguana_blockRO *B; struct iguana_ramchain *dest=0,blockR;
long filesize; void *ptr; char str[65],fname[1024];
if ( (bp= coin->current) != 0 && bp->hdrsi == coin->longestchain/coin->chain->bundlesize && bp->hdrsi == coin->balanceswritten && coin->RTheight >= bp->bundleheight && coin->RTheight < bp->bundleheight+bp->n )//&& coin->blocks.hwmchain.height >= coin->longestchain-1 && coin->RTramchain.H.data->numblocks < bp->n )
if ( (bp= coin->current) != 0 && time(NULL) > bp->lastRT && bp->hdrsi == coin->longestchain/coin->chain->bundlesize && bp->hdrsi == coin->balanceswritten && coin->RTheight >= bp->bundleheight && coin->RTheight < bp->bundleheight+bp->n )//&& coin->blocks.hwmchain.height >= coin->longestchain-1 && coin->RTramchain.H.data->numblocks < bp->n )
{
bp->lastRT = (uint32_t)time(NULL);
iguana_RTramchainalloc(coin,bp);
bp->isRT = 1;
while ( (rdata= coin->RTramchain.H.data) != 0 && coin->RTheight <= coin->blocks.hwmchain.height )
{
//printf("RT.%d vs hwm.%d\n",coin->RTheight,coin->blocks.hwmchain.height);
printf("RT.%d vs hwm.%d\n",coin->RTheight,coin->blocks.hwmchain.height);
dest = &coin->RTramchain;
B = (void *)(long)((long)rdata + rdata->Boffset);
bundlei = (coin->RTheight % coin->chain->bundlesize);

Loading…
Cancel
Save