Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
d408dea58f
  1. 6
      iguana/iguana_bundles.c
  2. 10
      iguana/iguana_recv.c

6
iguana/iguana_bundles.c

@ -1130,7 +1130,7 @@ int32_t iguana_bundleiters(struct supernet_info *myinfo,struct iguana_info *coin
{ {
max = bp->n; max = bp->n;
counter = iguana_bundleissuemissing(myinfo,coin,bp,1,1.); counter = iguana_bundleissuemissing(myinfo,coin,bp,1,1.);
if ( 1 && counter > 0 ) if ( 0 && counter > 0 )
printf("starti.%d range.%d now.%u spec.%-4d bundle.%-4d h.%-4d r.%-4d s.%-4d F.%d T.%d issued.%d mb.%d/%d\n",starti,range,(uint32_t)time(NULL),bp->numspec,bp->bundleheight/coin->chain->bundlesize,bp->numhashes,bp->numrecv,bp->numsaved,bp->emitfinish,timelimit,counter,coin->MAXBUNDLES,coin->bundlescount); printf("starti.%d range.%d now.%u spec.%-4d bundle.%-4d h.%-4d r.%-4d s.%-4d F.%d T.%d issued.%d mb.%d/%d\n",starti,range,(uint32_t)time(NULL),bp->numspec,bp->bundleheight/coin->chain->bundlesize,bp->numhashes,bp->numrecv,bp->numsaved,bp->emitfinish,timelimit,counter,coin->MAXBUNDLES,coin->bundlescount);
} else bp->nexttime++; } else bp->nexttime++;
if ( 0 && bp->emitfinish <= 1 ) if ( 0 && bp->emitfinish <= 1 )
@ -1207,7 +1207,7 @@ void iguana_unstickhdr(struct iguana_info *coin,struct iguana_bundle *bp,int32_t
void iguana_bundlemissings(struct supernet_info *myinfo,struct iguana_info *coin,struct iguana_bundle *bp,uint32_t now) void iguana_bundlemissings(struct supernet_info *myinfo,struct iguana_info *coin,struct iguana_bundle *bp,uint32_t now)
{ {
int32_t mult = 7,n=0,priority = 1; int32_t mult = 7,n=0,priority = 1;
if ( now > bp->missingstime+30 ) if ( now > bp->missingstime+13 )
{ {
if ( coin->current != 0 ) if ( coin->current != 0 )
{ {
@ -1348,7 +1348,7 @@ void iguana_bundlestats(struct supernet_info *myinfo,struct iguana_info *coin,ch
bp->issued[j] = block->issued; bp->issued[j] = block->issued;
} }
} }
if ( bp->hdrsi >= starti && bp->hdrsi < lasti ) if ( bp->hdrsi == starti )//bp->hdrsi >= starti && bp->hdrsi < lasti )
iguana_bundlemissings(myinfo,coin,bp,now); iguana_bundlemissings(myinfo,coin,bp,now);
} }
bp->metric = coin->bundlescount - bp->hdrsi; bp->metric = coin->bundlescount - bp->hdrsi;

10
iguana/iguana_recv.c

@ -957,15 +957,17 @@ uint32_t iguana_allhashcmp(struct supernet_info *myinfo,struct iguana_info *coin
block->hh.prev = prev; block->hh.prev = prev;
} }
//if ( bp->hdrsi < coin->MAXBUNDLES ) //if ( bp->hdrsi < coin->MAXBUNDLES )
iguana_blockQ("allhashes",coin,bp,i,blockhashes[i],1);
iguana_blockQ("allhashes",coin,bp,i,blockhashes[i],0); iguana_blockQ("allhashes",coin,bp,i,blockhashes[i],0);
n++;
} else printf("no allhashes block.%p or mismatch.%p\n",block,bp->blocks[i]); } else printf("no allhashes block.%p or mismatch.%p\n",block,bp->blocks[i]);
prev = block; prev = block;
} }
coin->allhashes++; coin->allhashes++;
n = 0; //n = 0;
if ( bp->hdrsi < coin->MAXBUNDLES || (coin->current != 0 && coin->lastpending != 0 && bp->hdrsi >= coin->current->hdrsi && bp->hdrsi <= coin->lastpending->hdrsi) ) //if ( bp->hdrsi < coin->MAXBUNDLES || (coin->current != 0 && coin->lastpending != 0 && bp->hdrsi >= coin->current->hdrsi && bp->hdrsi <= coin->lastpending->hdrsi) )
n = iguana_bundleissuemissing(myinfo,coin,bp,1,3.); // n = iguana_bundleissuemissing(myinfo,coin,bp,1,3.);
if ( 0 && n > 0 ) if ( 1 && n > 0 )
printf("ALLHASHES FOUND! %d allhashes.%d issued %d\n",bp->bundleheight,coin->allhashes,n); printf("ALLHASHES FOUND! %d allhashes.%d issued %d\n",bp->bundleheight,coin->allhashes,n);
//if ( bp->queued == 0 ) //if ( bp->queued == 0 )
// iguana_bundleQ(myinfo,coin,bp,bp->n*5 + (rand() % 500)); // iguana_bundleQ(myinfo,coin,bp,bp->n*5 + (rand() % 500));

Loading…
Cancel
Save