Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
f32a8585b3
  1. 2
      iguana/iguana777.h
  2. 6
      iguana/iguana_bundles.c
  3. 6
      iguana/main.c

2
iguana/iguana777.h

@ -42,7 +42,7 @@ typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t
#define IGUANA_HEADPERCENTAGE 0.
#define IGUANA_TAILPERCENTAGE 1.0
#define IGUANA_MAXPENDHDRS 1
#define IGUANA_MAXPENDINGREQUESTS 32
#define IGUANA_MAXPENDINGREQUESTS 3
#define IGUANA_PENDINGREQUESTS 128
#define IGUANA_MINPENDBUNDLES 2
#define IGUANA_MAXPENDBUNDLES 64

6
iguana/iguana_bundles.c

@ -874,12 +874,12 @@ int32_t iguana_bundlemissings(struct iguana_info *coin,struct iguana_bundle *bp,
lag = 3;
if ( bp->numissued < bp->n )
max = bp->numissued;
else max = bp->origmissings;
if ( bp->missingstime == 0 || bp->numissued < bp->n || bp == coin->current || missing < max || time(NULL) > bp->missingstime+lag )
else max = bp->n;//origmissings;
if ( bp->missingstime == 0 || bp->numissued < bp->n || bp == coin->current || missing < (max >> 3) || time(NULL) > bp->missingstime+lag )
{
if ( (n= iguana_bundlerequests(coin,missings,&bp->origmissings,&tmp,bp,lag)) > 0 )
{
printf("bundle.[%d] numissued.%d missings.%d n.%d capacity %d -> %d\n",bp->hdrsi,bp->numissued,bp->origmissings,n,capacity,capacity-n);
//printf("bundle.[%d] numissued.%d missings.%d n.%d capacity %d -> %d\n",bp->hdrsi,bp->numissued,bp->origmissings,n,capacity,capacity-n);
bp->numissued += n;
capacity -= n;
bp->missingstime = (uint32_t)time(NULL);

6
iguana/main.c

@ -357,11 +357,11 @@ void mainloop(struct supernet_info *myinfo)
{
if ( coin->active != 0 && coin->started != 0 )
{
printf("main active.%d started.%p\n",coin->active,coin->started);
//printf("main active.%d started.%p\n",coin->active,coin->started);
iguana_bundlestats(coin,str,IGUANA_DEFAULTLAG);
printf("done main active.%d started.%p\n",coin->active,coin->started);
//printf("done main active.%d started.%p\n",coin->active,coin->started);
iguana_reqblocks(coin);
printf("done2 main active.%d started.%p\n",coin->active,coin->started);
//printf("done2 main active.%d started.%p\n",coin->active,coin->started);
coin->RTramchain_busy = 1;
if ( iguana_realtime_update(coin) > 0 )
flag++;

Loading…
Cancel
Save