From d408dea58f08c2f76734e3461b89e4fcd8a983c4 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 10 Sep 2016 07:26:16 -0300 Subject: [PATCH] test --- iguana/iguana_bundles.c | 6 +++--- iguana/iguana_recv.c | 12 +++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index 948ba3e4c..f0382d72e 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -1130,7 +1130,7 @@ int32_t iguana_bundleiters(struct supernet_info *myinfo,struct iguana_info *coin { max = bp->n; 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); } else bp->nexttime++; 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) { int32_t mult = 7,n=0,priority = 1; - if ( now > bp->missingstime+30 ) + if ( now > bp->missingstime+13 ) { 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; } } - if ( bp->hdrsi >= starti && bp->hdrsi < lasti ) + if ( bp->hdrsi == starti )//bp->hdrsi >= starti && bp->hdrsi < lasti ) iguana_bundlemissings(myinfo,coin,bp,now); } bp->metric = coin->bundlescount - bp->hdrsi; diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index 0f9cfcd75..b0bff113e 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -957,15 +957,17 @@ uint32_t iguana_allhashcmp(struct supernet_info *myinfo,struct iguana_info *coin block->hh.prev = prev; } //if ( bp->hdrsi < coin->MAXBUNDLES ) - iguana_blockQ("allhashes",coin,bp,i,blockhashes[i],0); + iguana_blockQ("allhashes",coin,bp,i,blockhashes[i],1); + iguana_blockQ("allhashes",coin,bp,i,blockhashes[i],0); + n++; } else printf("no allhashes block.%p or mismatch.%p\n",block,bp->blocks[i]); prev = block; } coin->allhashes++; - n = 0; - 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.); - if ( 0 && 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) ) + // n = iguana_bundleissuemissing(myinfo,coin,bp,1,3.); + if ( 1 && n > 0 ) printf("ALLHASHES FOUND! %d allhashes.%d issued %d\n",bp->bundleheight,coin->allhashes,n); //if ( bp->queued == 0 ) // iguana_bundleQ(myinfo,coin,bp,bp->n*5 + (rand() % 500));