Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
4dcb0cf533
  1. 7
      iguana/iguana_bundles.c
  2. 2
      iguana/main.c

7
iguana/iguana_bundles.c

@ -571,7 +571,6 @@ void iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int32_
return; return;
} }
endmillis = OS_milliseconds() + timelimit; endmillis = OS_milliseconds() + timelimit;
printf("ITERATE bundle.%d n.%d r.%d s.%d finished.%d\n",bp->bundleheight,bp->n,bp->numrecv,bp->numsaved,bp->emitfinish);
memset(bp->issued,0,sizeof(bp->issued)); memset(bp->issued,0,sizeof(bp->issued));
while ( bp->emitfinish == 0 && OS_milliseconds() < endmillis ) while ( bp->emitfinish == 0 && OS_milliseconds() < endmillis )
{ {
@ -580,9 +579,10 @@ void iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int32_
{ {
if ( (block= bp->blocks[i]) != 0 ) if ( (block= bp->blocks[i]) != 0 )
{ {
if ( block->fpipbits == 0 && ((block->queued == 0 && bp->issued[i] == 0) || now > bp->issued[i]+1) ) if ( block->fpipbits == 0 && (block->queued == 0 || bp->issued[i] == 0 || now > bp->issued[i]+1) )
{ {
//printf("(%d:%d) ",bp->hdrsi,i); if ( bp->bundleheight == 20000 )
printf("(%d:%d) ",bp->hdrsi,i);
iguana_blockQ(coin,bp,i,block->RO.hash2,bp->numsaved > bp->n-10); iguana_blockQ(coin,bp,i,block->RO.hash2,bp->numsaved > bp->n-10);
bp->issued[i] = now; bp->issued[i] = now;
} }
@ -593,6 +593,7 @@ void iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int32_
} }
usleep(1000); usleep(1000);
} }
printf("ITERATE bundle.%d n.%d r.%d s.%d finished.%d\n",bp->bundleheight,bp->n,bp->numrecv,bp->numsaved,bp->emitfinish);
if ( bp->emitfinish == 0 ) if ( bp->emitfinish == 0 )
{ {
if ( bp->numsaved >= bp->n ) if ( bp->numsaved >= bp->n )

2
iguana/main.c

@ -37,7 +37,7 @@ static int32_t initflag;
#ifdef __linux__ #ifdef __linux__
int32_t IGUANA_NUMHELPERS = 16; int32_t IGUANA_NUMHELPERS = 16;
#else #else
int32_t IGUANA_NUMHELPERS = 8; int32_t IGUANA_NUMHELPERS = 16;
#endif #endif
char *hash_parser(struct supernet_info *myinfo,char *hashname,cJSON *json,char *remoteaddr) char *hash_parser(struct supernet_info *myinfo,char *hashname,cJSON *json,char *remoteaddr)

Loading…
Cancel
Save