From 32579f62205617da52039b1a802d50d2817eba72 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 7 Apr 2016 17:15:31 -0500 Subject: [PATCH] test --- iguana/iguana_bundles.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index 93aa652b1..176e64d35 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -1075,13 +1075,13 @@ void iguana_bundlestats(struct iguana_info *coin,char *str,int32_t lag) coin->numemit = numemit; coin->spaceused = spaceused; coin->numverified = numv; - char str5[65]; + char str5[65]; int32_t smetric; if ( firstgap != 0 && firstgap->hdrsi < coin->bundlescount-1 ) // coin->isRT { - if ( coin->stuckmonitor != (firstgap->hdrsi * coin->chain->bundlesize * 10) + firstgap->numsaved + firstgap->numhashes + firstgap->numcached ) + smetric = (firstgap->hdrsi * 10000) + firstgap->numsaved + firstgap->numhashes + firstgap->numcached; + if ( coin->stuckmonitor != smetric ) { - printf("stuckmonitor.%d -> %d\n",coin->stuckmonitor,(firstgap->hdrsi * 10000) + firstgap->numsaved + firstgap->numhashes + firstgap->numcached); - coin->stuckmonitor = (firstgap->hdrsi * 10000) + firstgap->numsaved + firstgap->numhashes + firstgap->numcached; + coin->stuckmonitor = smetric; coin->stucktime = (uint32_t)time(NULL); coin->stuckiters = 0; } @@ -1090,7 +1090,7 @@ void iguana_bundlestats(struct iguana_info *coin,char *str,int32_t lag) struct iguana_blockreq *breq; int32_t n,lag; //priority=3, lag = (int32_t)time(NULL) - coin->stucktime; bp = firstgap; - printf("NONZ stucktime.%u lag.%d iters.%d vs %d metric.%d\n",coin->stucktime,lag,coin->stuckiters,lag/coin->MAXSTUCKTIME,(firstgap->hdrsi * coin->chain->bundlesize * 10) + firstgap->numsaved + firstgap->numhashes + firstgap->numcached); + printf("NONZ stucktime.%u lag.%d iters.%d vs %d metric.%d\n",coin->stucktime,lag,coin->stuckiters,lag/coin->MAXSTUCKTIME,smetric); if ( (lag/coin->MAXSTUCKTIME) > coin->stuckiters ) { printf("UNSTICK\n"); @@ -1112,7 +1112,7 @@ void iguana_bundlestats(struct iguana_info *coin,char *str,int32_t lag) printf("issued %d priority requests [%d] to unstick stuckiters.%d lag.%d\n",n,bp->hdrsi,coin->stuckiters,lag); //else printf("no bundlerequests issued\n"); } - } else printf("stuck metric.%d\n",(firstgap->hdrsi * coin->chain->bundlesize * 10) + firstgap->numsaved + firstgap->numhashes + firstgap->numcached); + } //else printf("stuck metric.%d\n",smetric); } if ( coin->isRT != 0 || (firstgap != 0 && firstgap->hdrsi == coin->bundlescount-1) ) coin->stucktime = coin->stuckiters = 0;