Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
ee12a95886
  1. 8
      iguana/iguana777.c
  2. 8
      iguana/iguana_bundles.c
  3. 2
      iguana/iguana_unspents.c
  4. 2
      iguana/main.c

8
iguana/iguana777.c

@ -282,7 +282,7 @@ void iguana_bundleQ(struct iguana_info *coin,struct iguana_bundle *bp,int32_t ti
ptr->starttime = (uint32_t)time(NULL);
ptr->timelimit = timelimit;
coin->numbundlesQ++;
if ( bp->hdrsi > 170 )
if ( 0 && bp->hdrsi > 170 )
printf("%s %p bundle.%d[%d] ht.%d emitfinish.%u\n",coin->symbol,bp,ptr->hdrsi,bp->n,bp->bundleheight,bp->emitfinish);
queue_enqueue("bundlesQ",&bundlesQ,&ptr->DL,0);
}
@ -407,7 +407,7 @@ void iguana_helper(void *arg)
}*/
if ( (helperid % IGUANA_NUMHELPERS) == (0 % IGUANA_NUMHELPERS) && (ptr= queue_dequeue(&bundlesQ,0)) != 0 )
{
printf("bundleQ size.%d\n",queue_size(&bundlesQ));
//printf("bundleQ size.%d\n",queue_size(&bundlesQ));
idle = 0;
coin = ptr->coin;
if ( (bp= ptr->bp) != 0 && coin != 0 )
@ -417,7 +417,7 @@ void iguana_helper(void *arg)
flag += iguana_bundleiters(ptr->coin,&MEM,MEMB,bp,ptr->timelimit);
else
{
printf("skip.%d lag.%ld coin->active.%d\n",bp->hdrsi,time(NULL)-bp->nexttime,coin->active);
//printf("skip.%d lag.%ld coin->active.%d\n",bp->hdrsi,time(NULL)-bp->nexttime,coin->active);
iguana_bundleQ(ptr->coin,bp,1000);
}
if ( coin->current != 0 && coin->current->hdrsi != coin->bundlescount-1 )
@ -429,7 +429,7 @@ void iguana_helper(void *arg)
}
if ( (helperid % IGUANA_NUMHELPERS) == (1 % IGUANA_NUMHELPERS) && (ptr= queue_dequeue(&spendvectorsQ,0)) != 0 )
{
printf("spendvectorsQ size.%d\n",queue_size(&spendvectorsQ));
//printf("spendvectorsQ size.%d\n",queue_size(&spendvectorsQ));
coin = ptr->coin;
if ( (bp= ptr->bp) != 0 && coin != 0 )
{

8
iguana/iguana_bundles.c

@ -799,7 +799,7 @@ int64_t iguana_bundlecalcs(struct iguana_info *coin,struct iguana_bundle *bp)
int32_t iguana_bundlefinish(struct iguana_info *coin,struct iguana_bundle *bp)
{
struct iguana_bundle *prevbp; int32_t i,retval;
struct iguana_bundle *prevbp; int32_t i;
#ifdef IGUANA_SERIALIZE_SPENDVECTORGEN
//if ( coin->MAXMEM <= 4*(1024L * 1024 * 1024) )
{
@ -811,7 +811,7 @@ int32_t iguana_bundlefinish(struct iguana_info *coin,struct iguana_bundle *bp)
if ( (prevbp= coin->bundles[i]) == 0 || prevbp->emitfinish < coin->startutc || (i < bp->hdrsi-IGUANA_NUMHELPERS && prevbp->utxofinish <= 1)
)
break;
if ( i == bp->hdrsi && coin->emitbusy <= 0 )
if ( i == bp->hdrsi && coin->emitbusy <= 1 )
{
if ( bp->startutxo == 0 )
{
@ -840,7 +840,7 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru
}
if ( coin->current == 0 )
coin->current = coin->bundles[0];
printf("ITER now.%u spec.%-4d bundle.%-4d h.%-4d r.%-4d s.%-4d F.%d T.%d issued.%d mb.%d/%d\n",(uint32_t)time(NULL),bp->numspec,bp->bundleheight/coin->chain->bundlesize,bp->numhashes,bp->numrecv,bp->numsaved,bp->emitfinish,timelimit,counter,coin->MAXBUNDLES,coin->bundlescount);
//printf("ITER now.%u spec.%-4d bundle.%-4d h.%-4d r.%-4d s.%-4d F.%d T.%d issued.%d mb.%d/%d\n",(uint32_t)time(NULL),bp->numspec,bp->bundleheight/coin->chain->bundlesize,bp->numhashes,bp->numrecv,bp->numsaved,bp->emitfinish,timelimit,counter,coin->MAXBUNDLES,coin->bundlescount);
range = coin->MAXBUNDLES;
currentbp = coin->current;
lastbp = coin->lastpending;
@ -954,7 +954,7 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru
}
}
}
}
} else bp->nexttime += 10;
//printf("done hdrs.%d\n",bp->hdrsi);
iguana_bundleQ(coin,bp,1000);
return(retval);

2
iguana/iguana_unspents.c

@ -1430,7 +1430,7 @@ int32_t iguana_balancecalc(struct iguana_info *coin,struct iguana_bundle *bp,int
iguana_validateQ(coin,bp);
return(flag);
}
bp->nexttime = (uint32_t)time(NULL) + 1;// + cbrt(bp->hdrsi);
bp->nexttime = (uint32_t)time(NULL);
if ( bp != 0 && coin != 0 && (bp->hdrsi == 0 || (prevbp= coin->bundles[bp->hdrsi-1]) != 0) )
{
#ifdef IGUANA_SERIALIZE_BALANCEGEN

2
iguana/main.c

@ -410,7 +410,7 @@ void mainloop(struct supernet_info *myinfo)
iguana_jsonQ();
pangea_queues(SuperNET_MYINFO(0));
if ( flag == 0 )
usleep(50000);
usleep(10000);
}
}

Loading…
Cancel
Save