Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
5a319abf5b
  1. 3
      iguana/iguana_json.c
  2. 4
      iguana/iguana_recv.c

3
iguana/iguana_json.c

@ -455,6 +455,7 @@ int32_t iguana_processjsonQ(struct iguana_info *coin) // reentrant, can be calle
{
if ( ptr->expired != 0 )
{
*ptr->retjsonstrp = clonestr("{\"error\":\"request timeout\"}");
printf("garbage collection: expired.(%s)\n",ptr->jsonstr);
myfree(ptr,ptr->allocsize);
} else queue_enqueue("finishedQ",&coin->finishedQ,&ptr->DL,0);
@ -490,7 +491,7 @@ char *iguana_blockingjsonstr(struct iguana_info *coin,char *jsonstr,uint64_t tag
while ( OS_milliseconds() < expiration )
{
usleep(100);
if ( (retjsonstr= *ptr->retjsonstrp) != 0 )
if ( retjsonstr != 0 )
{
//printf("blocking retjsonstr.(%s)\n",retjsonstr);
queue_delete(&coin->finishedQ,&ptr->DL,allocsize,1);

4
iguana/iguana_recv.c

@ -307,7 +307,7 @@ int32_t iguana_allhashcmp(struct iguana_info *coin,struct iguana_bundle *bp,bits
if ( bp->emitfinish == 0 && (block= bp->blocks[i]) != 0 && (block->queued == 0 && block->fpipbits == 0) && block->numrequests < 3 )
iguana_blockQ(coin,bp,i,block->RO.hash2,0), n++;
}
printf("ALLHASHES FOUND! %d requested.%d\n",bp->bundleheight,n);
//printf("ALLHASHES FOUND! %d requested.%d\n",bp->bundleheight,n);
return(i);
}
}
@ -561,7 +561,7 @@ int32_t iguana_reqhdrs(struct iguana_info *coin)
char str[65];
bits256_str(str,bp->hashes[0]);
//printf("(%s %d).%d ",str,bp->bundleheight,i);
printf("%d ",bp->bundleheight);
//printf("%d ",bp->bundleheight);
init_hexbytes_noT(hashstr,bp->hashes[0].bytes,sizeof(bits256));
queue_enqueue("hdrsQ",&coin->hdrsQ,queueitem(hashstr),1);
/*if ( strcmp(coin->symbol,"BTC") != 0 && bits256_nonz(bp->hashes[1]) > 0 )

Loading…
Cancel
Save