From aaea8c8b1c5940313cbb44e0fba1862ed60ae0a9 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 6 Apr 2016 13:15:40 -0500 Subject: [PATCH] test --- iguana/iguana_bundles.c | 6 ++++++ iguana/iguana_unspents.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index 763c05e26..627a6912c 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -979,6 +979,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 ? .5 : 2) : 7.); else mult = 3.; + 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; diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index 8b0f24756..a0b373ba0 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -1988,12 +1988,13 @@ int32_t iguana_realtime_update(struct iguana_info *coin) struct iguana_bundle *bp; struct iguana_ramchaindata *rdata; int32_t bundlei,i,n,flag=0; bits256 hash2; struct iguana_peer *addr; struct iguana_block *block=0; struct iguana_blockRO *B; struct iguana_ramchain *dest=0,blockR; //starti = coin->RTheight % coin->chain->bundlesize; - if ( (bp= coin->current) != 0 && bp->hdrsi == coin->longestchain/coin->chain->bundlesize && bp->hdrsi == coin->balanceswritten && coin->RTheight >= bp->bundleheight && coin->RTheight < bp->bundleheight+bp->n && (coin->RTheight <= coin->blocks.hwmchain.height || time(NULL) > bp->lastRT) ) + if ( (bp= coin->current) != 0 && bp->hdrsi == coin->longestchain/coin->chain->bundlesize && bp->hdrsi == coin->balanceswritten && coin->RTheight >= bp->bundleheight && coin->RTheight < bp->bundleheight+bp->n && (coin->RTheight <= coin->blocks.hwmchain.height || time(NULL) > bp->lastRT+10) ) { + printf("check RTheight.%d hwm.%d longest.%d\n",coin->RTheight,coin->blocks.hwmchain.height,coin->longestchain); if ( bits256_cmp(coin->RThash1,bp->hashes[1]) != 0 ) coin->RThash1 = bp->hashes[1]; bp->lastRT = (uint32_t)time(NULL); - if ( 0 && coin->peers.numranked > 0 && time(NULL) > coin->RThdrstime+10 ) + if ( 1 && coin->peers.numranked > 0 && time(NULL) > coin->RThdrstime+10 ) { iguana_RThdrs(coin,bp,coin->peers.numranked); coin->RThdrstime = bp->lastRT;