Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
4497268e5b
  1. 13
      iguana/iguana_bundles.c
  2. 4
      iguana/iguana_recv.c

13
iguana/iguana_bundles.c

@ -503,8 +503,8 @@ void iguana_bundlestats(struct iguana_info *coin,char *str)
if ( pend > 0 )
{
origissue = (_IGUANA_MAXPENDING*coin->peers.numranked - pend);
if ( origissue < 8 )
origissue = 8;
//if ( origissue < 8 )
// origissue = 8;
issue = origissue;
while ( issue > 0 && m++ < 100 )
{
@ -536,8 +536,8 @@ void iguana_bundlestats(struct iguana_info *coin,char *str)
}
/*for (i=0; i<n&&i<3; i++)
printf("(%.5f %.0f).%d ",coin->rankedbps[i][0],coin->rankedbps[i][1],coin->bundles[(int32_t)coin->rankedbps[i][1]]->numrecv);*/
//if ( flag != 0 )
printf("rem.%d issue.%d pend.%d | numranked.%d\n",n,origissue,pend,coin->peers.numranked);
if ( flag != 0 )
printf("rem.%d issue.%d pend.%d | numranked.%d\n",n,origissue,pend,coin->peers.numranked);
}
}
coin->numremain = n;
@ -554,7 +554,12 @@ void iguana_bundlestats(struct iguana_info *coin,char *str)
sprintf(str,"N[%d] h.%d r.%d c.%d:%d:%d s.%d E.%d:%d M.%d L.%d est.%d %s %d:%02d:%02d %03.3f peers.%d/%d",coin->bundlescount,numhashes,coin->blocksrecv,coin->numcached,numcached,coin->cachefreed,numsaved,numemit,coin->numreqsent,coin->blocks.hwmchain.height,coin->longestchain,coin->MAXBUNDLES,mbstr(str2,estsize),(int32_t)difft.x/3600,(int32_t)(difft.x/60)%60,(int32_t)difft.x%60,difft.millis,p,coin->MAXPEERS);
//sprintf(str+strlen(str),"%s.%-2d %s time %.2f files.%d Q.%d %d\n",coin->symbol,flag,str,(double)(time(NULL)-coin->starttime)/60.,coin->peers.numfiles,queue_size(&coin->priorityQ),queue_size(&coin->blocksQ));
//if ( (rand() % 100) == 0 )
static uint32_t lastdisp;
if ( time(NULL) > lastdisp+10 )
{
printf("%s\n",str);
lastdisp = (uint32_t)time(NULL);
}
strcpy(coin->statusstr,str);
coin->estsize = estsize;
}

4
iguana/iguana_recv.c

@ -371,7 +371,7 @@ struct iguana_bundle *iguana_bundleset(struct iguana_info *coin,struct iguana_bl
if ( bundlei == 0 )
{
char str[65]; bits256_str(str,block->RO.prev_block);
printf("found block -> hdr.%s\n",str);
//printf("found block -> hdr.%s\n",str);
queue_enqueue("hdrsQ",&coin->hdrsQ,queueitem(str),1);
}
}
@ -489,7 +489,7 @@ struct iguana_bundlereq *iguana_recvblock(struct iguana_info *coin,struct iguana
if ( prevbp->numhashes < prevbp->n && prevbundlei == 0 )
{
char str[65]; bits256_str(str,prevbp->hashes[0]);
printf("found block -> %d hdr.%s\n",prevbp->bundleheight,str);
//printf("Afound block -> %d hdr.%s\n",prevbp->bundleheight,str);
queue_enqueue("hdrsQ",&coin->hdrsQ,queueitem(str),1);
}
//char str[65]; printf("PREV %s prevbp.%p[%d] h.%d\n",bits256_str(str,origblock->RO.prev_block),prevbp,prevbundlei,prevbp->numhashes);

Loading…
Cancel
Save