Browse Source

test

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

2
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++;
printf("%s %p bundle.%d[%d] ht.%d emitfinish.%u\n",coin->symbol,bp,ptr->hdrsi,bp->n,bp->bundleheight,bp->emitfinish);
//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);
}

28
iguana/iguana_bundles.c

@ -875,7 +875,7 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru
{
if ( (retval= iguana_bundlefinish(coin,bp)) > 0 )
{
//printf("moved to balancesQ.%d bundleiters.%d\n",bp->hdrsi,bp->bundleheight);
printf("moved to balancesQ.%d bundleiters.%d\n",bp->hdrsi,bp->bundleheight);
bp->queued = 0;
return(0);
} //else printf("finish incomplete.%d\n",bp->hdrsi);
@ -894,24 +894,19 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru
bp->emitfinish = 1;
iguana_bundletweak(coin,bp);
sleep(1); // just in case data isnt totally sync'ed to HDD
if ( 0 )
iguana_emitQ(coin,bp);
coin->emitbusy++;
if ( iguana_bundlesaveHT(coin,mem,memB,bp,(uint32_t)time(NULL)) == 0 )
{
//fprintf(stderr,"emitQ done coin.%p bp.[%d] ht.%d\n",coin,bp->hdrsi,bp->bundleheight);
bp->emitfinish = (uint32_t)time(NULL) + 1;
coin->numemitted++;
}
else
{
coin->emitbusy++;
if ( iguana_bundlesaveHT(coin,mem,memB,bp,(uint32_t)time(NULL)) == 0 )
{
//fprintf(stderr,"emitQ done coin.%p bp.[%d] ht.%d\n",coin,bp->hdrsi,bp->bundleheight);
bp->emitfinish = (uint32_t)time(NULL) + 1;
coin->numemitted++;
}
else
{
fprintf(stderr,"emitQ done coin.%p bp.[%d] ht.%d error\n",coin,bp->hdrsi,bp->bundleheight);
bp->emitfinish = 0;
}
coin->emitbusy--;
fprintf(stderr,"emitQ done coin.%p bp.[%d] ht.%d error\n",coin,bp->hdrsi,bp->bundleheight);
bp->emitfinish = 0;
}
coin->emitbusy--;
}
retval = 1;
}
@ -971,6 +966,7 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru
}
}
}
printf("done hdrs.%d\n",bp->hdrsi);
iguana_bundleQ(coin,bp,1000);
return(retval);
}

2
iguana/iguana_unspents.c

@ -682,7 +682,7 @@ int32_t iguana_spendvectors(struct iguana_info *coin,struct iguana_bundle *bp)
}
if ( now > spentbp->lastprefetch+5+5*coin->emitbusy )
{
//printf("prefetch[%d] from.[%d] lag.%d\n",spentbp->hdrsi,bp->hdrsi,now - spentbp->lastprefetch);
printf("prefetch[%d] from.[%d] lag.%d\n",spentbp->hdrsi,bp->hdrsi,now - spentbp->lastprefetch);
iguana_ramchain_prefetch(coin,ramchain);
iguana_ramchain_prefetch(coin,&spentbp->ramchain);
bp->lastprefetch = spentbp->lastprefetch = now;

2
iguana/main.c

@ -366,7 +366,7 @@ void mainloop(struct supernet_info *myinfo)
bp = ptr->bp;
if ( ptr->coin != coin || bp == 0 || time(NULL) < bp->nexttime )
{
if ( bp != 0 )
if ( 0 && bp != 0 )
printf("skip.%d lag.%ld\n",bp->hdrsi,bp->nexttime-time(NULL));
queue_enqueue("balanceQ",&balancesQ,&ptr->DL,0);
continue;

Loading…
Cancel
Save