diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index 62786fa9b..cb7fbb7b7 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -912,14 +912,12 @@ int32_t iguana_bundlemissings(struct iguana_info *coin,struct iguana_bundle *bp, { priority += 1 + (bp == coin->current); } - //if ( bp == coin->current ) - // priority++; - } - if ( bp == coin->current && queue_size(&coin->priorityQ) < bp->n ) - { - for (i=0; in; i++) - if ( GETBIT(missings,i) != 0 && bits256_nonz(bp->hashes[i]) != 0 ) - iguana_blockQ("missings",coin,bp,i,bp->hashes[i],1); + if ( queue_size(&coin->priorityQ) < bp->n/(dist+1) ) + { + for (i=0; in; i++) + if ( GETBIT(missings,i) != 0 && bits256_nonz(bp->hashes[i]) != 0 ) + iguana_blockQ("missings",coin,bp,i,bp->hashes[i],1); + } } if ( bp->durationscount != 0 ) { diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index 25025bcb5..6f6530119 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -1446,8 +1446,7 @@ int32_t iguana_balanceflush(struct iguana_info *coin,int32_t refhdrsi,int32_t pu if ( iguana_mapvolatiles(coin,&bp->ramchain) != 0 ) printf("error mapping bundle.[%d]\n",hdrsi); } - char str[65]; printf("BALANCES WRITTEN for %d bundles %s\n",coin->balanceswritten,bits256_str(str,coin->balancehash)); - iguana_coinpurge(coin); + char str[65]; printf("BALANCES WRITTEN for %d/%d bundles %s\n",coin->balanceswritten,origcount,bits256_str(str,coin->balancehash)); if ( strcmp(coin->symbol,"BTC") == 0 && coin->balanceswritten > origcount+10 ) { int32_t i; @@ -1462,6 +1461,7 @@ int32_t iguana_balanceflush(struct iguana_info *coin,int32_t refhdrsi,int32_t pu } exit(-1); } + iguana_coinpurge(coin); //coin->balanceswritten = iguana_volatileinit(coin); //iguana_RTramchainfree(coin); return(coin->balanceswritten);