Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
1fa8b0ea74
  1. 14
      iguana/iguana777.c
  2. 4
      iguana/iguana777.h
  3. 9
      iguana/iguana_recv.c

14
iguana/iguana777.c

@ -305,7 +305,15 @@ int32_t iguana_helpertask(FILE *fp,struct OS_memspace *mem,struct OS_memspace *m
}
else if ( ptr->type == 'B' )
{
iguana_bundleiters(coin,bp,ptr->timelimit);
if ( iguana_bundleiters(coin,bp,ptr->timelimit) == 'E' )
{
if ( iguana_bundlesaveHT(coin,mem,memB,bp,ptr->starttime) == 0 )
{
//fprintf(stderr,"emitQ coin.%p bp.[%d]\n",ptr->coin,bp->bundleheight);
bp->emitfinish = (uint32_t)time(NULL) + 1;
coin->numemitted++;
} else bp->emitfinish = 0;
}
}
else if ( ptr->type == 'E' )
{
@ -378,8 +386,8 @@ void iguana_helper(void *arg)
}
}
if ( flag == 0 )
usleep(100000);
else usleep(5000);
usleep(500000);
else usleep(50000);
}
}

4
iguana/iguana777.h

@ -37,9 +37,9 @@ 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_MAXPENDING 32
#define _IGUANA_MAXPENDING 3
#define IGUANA_MINPENDBUNDLES 16
#define IGUANA_MAXPENDBUNDLES 150
#define IGUANA_MAXPENDBUNDLES 64
#define IGUANA_BUNDLELOOP 10000
#define IGUANA_RPCPORT 7778
#define IGUANA_MAXRAMCHAINSIZE ((uint64_t)1024L * 1024L * 1024L * 16)

9
iguana/iguana_recv.c

@ -533,6 +533,11 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int
iguana_bundleQ(coin,bp,1000);
return(0);
}
else if ( bp->emitfinish != 0 )
{
iguana_bundleQ(coin,bp,1000);
return(0);
}
//printf("BUNDLEITERS.%d\n",bp->hdrsi);
if ( bp->hdrsi <= lasti && coin->lastpending != 0 )
{
@ -622,9 +627,9 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int
coin->MAXBUNDLES++;
}
sleep(1);
iguana_emitQ(coin,bp);
//iguana_emitQ(coin,bp);
iguana_bundleQ(coin,bp,width);
return(1);
return('E');
}
}
iguana_bundleQ(coin,bp,width);

Loading…
Cancel
Save