From 3f3ccd506020d8d993db6810d5aaed7894fd4d41 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 7 Apr 2016 02:16:32 -0500 Subject: [PATCH] test --- iguana/iguana_bundles.c | 10 +++++++--- iguana/main.c | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index d08d84de6..e830c4a70 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -1020,12 +1020,12 @@ double iguana_bundlemissings(struct iguana_info *coin,struct iguana_bundle *bp,d if ( aveduration != 0. ) mult = ((bp == coin->current) ? (strcmp("BTC",coin->symbol) != 0 ? 1. : 3) : 7.); else mult = 5.; - /*if ( mult > 2 && bp->numcached > .95*bp->n ) + if ( mult > 2 && bp->numcached > .95*bp->n ) { if ( bp->numcached > .99*bp->n ) mult = 2.; else mult = 1.; - }*/ + } if ( bp->numissued < bp->n ) max = bp->numissued; else max = bp->origmissings; @@ -1204,7 +1204,11 @@ void iguana_bundlestats(struct iguana_info *coin,char *str,int32_t lag) //printf("bundlescount.%d %p[%d]\n",coin->bundlescount,coin->current,coin->current->hdrsi); } if ( lastpending != 0 ) - coin->lastpending = lastpending; + { + if ( lastpending->hdrsi+done > coin->bundlescount-1 ) + lastpending = coin->bundles[coin->bundlescount-1]; + else lastpending = coin->bundles[lastpending->hdrsi+done]; + } else coin->lastpending = coin->bundles[coin->bundlescount - 1]; coin->numsaved = numsaved; coin->numemit = numemit; diff --git a/iguana/main.c b/iguana/main.c index a7fdc52a7..692da75bb 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -1243,7 +1243,7 @@ void iguana_main(void *arg) if ( 1 ) { sleep(1); - if ( 1 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"VALIDATE\":1,\"prefetchlag\":13,\"startpend\":2048,\"endpend\":2048,\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":0,\"maxpeers\":256,\"newcoin\":\"BTCD\",\"active\":1,\"numhelpers\":8,\"poll\":10}"),0,myinfo->rpcport)) != 0 ) + if ( 1 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"VALIDATE\":1,\"prefetchlag\":13,\"startpend\":128,\"endpend\":128,\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":0,\"maxpeers\":256,\"newcoin\":\"BTCD\",\"active\":1,\"numhelpers\":8,\"poll\":10}"),0,myinfo->rpcport)) != 0 ) { free(str); if ( 0 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":1024,\"maxpeers\":256,\"newcoin\":\"BTCD\",\"active\":1}"),0,myinfo->rpcport)) != 0 )