Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
47b66e7c27
  1. 4
      iguana/iguana_bundles.c
  2. 4
      iguana/iguana_recv.c

4
iguana/iguana_bundles.c

@ -439,7 +439,7 @@ int64_t iguana_bundlecalcs(struct iguana_info *coin,struct iguana_bundle *bp)
bp->emitfinish = 1; bp->emitfinish = 1;
iguana_emitQ(coin,bp); iguana_emitQ(coin,bp);
} }
else bp->metric = (2*bp->n - bp->numsaved - bp->numrecv);//sqrt((sqrt(fabs(bp->estsize - bp->datasize)) * (bp->n - bp->numsaved)) * (bp->hdrsi + 1)); else bp->metric = (2*bp->n - bp->numsaved - bp->numrecv) * (bp->hdrsi + 1);//sqrt((sqrt(fabs(bp->estsize - bp->datasize)) * (bp->n - bp->numsaved)) * (bp->hdrsi + 1));
} }
//printf("%f ",bp->metric); //printf("%f ",bp->metric);
return(bp->estsize); return(bp->estsize);
@ -535,7 +535,7 @@ void iguana_bundlestats(struct iguana_info *coin,char *str)
} }
/*for (i=0; i<n&&i<3; i++) /*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);*/ printf("(%.5f %.0f).%d ",coin->rankedbps[i][0],coin->rankedbps[i][1],coin->bundles[(int32_t)coin->rankedbps[i][1]]->numrecv);*/
if ( 0 && flag != 0 ) if ( 1 && flag != 0 )
printf("rem.%d issue.%d pend.%d | numranked.%d\n",n,origissue,pend,coin->peers.numranked); printf("rem.%d issue.%d pend.%d | numranked.%d\n",n,origissue,pend,coin->peers.numranked);
} }
} }

4
iguana/iguana_recv.c

@ -591,8 +591,8 @@ int32_t iguana_reqhdrs(struct iguana_info *coin)
if ( (bp= coin->bundles[i]) != 0 && bp->emitfinish < coin->startutc ) if ( (bp= coin->bundles[i]) != 0 && bp->emitfinish < coin->startutc )
{ {
if ( i == coin->bundlescount-1 ) if ( i == coin->bundlescount-1 )
lag = 5; lag = 60;
else lag = 3 + (rand() % 13); else lag = 13 + (rand() % 13);
//if ( i < coin->bundlescount-1 && (bp->numhashes >= (rand() % bp->n) || time(NULL) < bp->hdrtime+lag) ) //if ( i < coin->bundlescount-1 && (bp->numhashes >= (rand() % bp->n) || time(NULL) < bp->hdrtime+lag) )
// continue; // continue;
if ( bp->numhashes < bp->n && bp->bundleheight+bp->numhashes < coin->longestchain && time(NULL) > bp->issuetime+lag ) if ( bp->numhashes < bp->n && bp->bundleheight+bp->numhashes < coin->longestchain && time(NULL) > bp->issuetime+lag )

Loading…
Cancel
Save