Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
9d3b7af57d
  1. 9
      iguana/iguana_bundles.c
  2. 23
      iguana/main.c

9
iguana/iguana_bundles.c

@ -378,6 +378,11 @@ int32_t iguana_bundleissue(struct iguana_info *coin,struct iguana_bundle *bp,int
starti = coin->current->hdrsi;
else starti = 0;
lag = (bp->hdrsi - starti);
lag *= lag;
if ( lag < 10 )
lag = 10;
else if ( lag > 300 )
lag = 300;
if ( (numpeers= coin->peers.numranked) > 8 )//&& bp->currentflag < bp->n )
{
if ( bp->currentflag == 0 )
@ -498,7 +503,7 @@ int32_t iguana_bundleissue(struct iguana_info *coin,struct iguana_bundle *bp,int
printf("[%d:%d] ",bp->hdrsi,i);
}
flag++;
} else printf("%d ",now - block->issued);
} //else printf("%d ",now - block->issued);
}
}
if ( flag != 0 && bp == coin->current )
@ -709,7 +714,7 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int
}
retval = 1;
}
else if ( bp->hdrsi > starti && bp->hdrsi <= starti+range )
else if ( bp->hdrsi >= starti && bp->hdrsi <= starti+range )
{
max = sqrt(bp->n) - (bp->n/coin->MAXBUNDLES)*(bp->hdrsi - starti);
if ( max > 100 )

23
iguana/main.c

@ -331,20 +331,23 @@ void mainloop(struct supernet_info *myinfo)
while ( 1 )
{
flag = 0;
for (i=0; i<IGUANA_MAXCOINS; i++)
if ( (coin= Coins[i]) != 0 && coin->active != 0 && (bp= coin->current) != 0 )
{
iguana_bundleissue(coin,bp,bp->n,100);
if ( (ptr= queue_dequeue(&balancesQ,0)) != 0 )
if ( 0 )
{
for (i=0; i<IGUANA_MAXCOINS; i++)
if ( (coin= Coins[i]) != 0 && coin->active != 0 && (bp= coin->current) != 0 )
{
if ( ptr->bp != 0 && ptr->coin != 0 )
iguana_bundleissue(coin,bp,bp->n,100);
if ( (ptr= queue_dequeue(&balancesQ,0)) != 0 )
{
iguana_balancecalc(ptr->coin,ptr->bp);
//iguana_coinflush(ptr->coin,0);
if ( ptr->bp != 0 && ptr->coin != 0 )
{
iguana_balancecalc(ptr->coin,ptr->bp);
//iguana_coinflush(ptr->coin,0);
}
myfree(ptr,ptr->allocsize);
}
myfree(ptr,ptr->allocsize);
}
}
}
iguana_jsonQ();
if ( flag == 0 )
{

Loading…
Cancel
Save