Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
9d3b7af57d
  1. 9
      iguana/iguana_bundles.c
  2. 3
      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; starti = coin->current->hdrsi;
else starti = 0; else starti = 0;
lag = (bp->hdrsi - starti); 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 ( (numpeers= coin->peers.numranked) > 8 )//&& bp->currentflag < bp->n )
{ {
if ( bp->currentflag == 0 ) 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); printf("[%d:%d] ",bp->hdrsi,i);
} }
flag++; flag++;
} else printf("%d ",now - block->issued); } //else printf("%d ",now - block->issued);
} }
} }
if ( flag != 0 && bp == coin->current ) 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; 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); max = sqrt(bp->n) - (bp->n/coin->MAXBUNDLES)*(bp->hdrsi - starti);
if ( max > 100 ) if ( max > 100 )

3
iguana/main.c

@ -331,6 +331,8 @@ void mainloop(struct supernet_info *myinfo)
while ( 1 ) while ( 1 )
{ {
flag = 0; flag = 0;
if ( 0 )
{
for (i=0; i<IGUANA_MAXCOINS; i++) for (i=0; i<IGUANA_MAXCOINS; i++)
if ( (coin= Coins[i]) != 0 && coin->active != 0 && (bp= coin->current) != 0 ) if ( (coin= Coins[i]) != 0 && coin->active != 0 && (bp= coin->current) != 0 )
{ {
@ -345,6 +347,7 @@ void mainloop(struct supernet_info *myinfo)
myfree(ptr,ptr->allocsize); myfree(ptr,ptr->allocsize);
} }
} }
}
iguana_jsonQ(); iguana_jsonQ();
if ( flag == 0 ) if ( flag == 0 )
{ {

Loading…
Cancel
Save