Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
94659a67a3
  1. 6
      iguana/iguana_bundles.c
  2. 4
      iguana/iguana_unspents.c

6
iguana/iguana_bundles.c

@ -912,15 +912,13 @@ int32_t iguana_bundlemissings(struct iguana_info *coin,struct iguana_bundle *bp,
{ {
priority += 1 + (bp == coin->current); priority += 1 + (bp == coin->current);
} }
//if ( bp == coin->current ) if ( queue_size(&coin->priorityQ) < bp->n/(dist+1) )
// priority++;
}
if ( bp == coin->current && queue_size(&coin->priorityQ) < bp->n )
{ {
for (i=0; i<bp->n; i++) for (i=0; i<bp->n; i++)
if ( GETBIT(missings,i) != 0 && bits256_nonz(bp->hashes[i]) != 0 ) if ( GETBIT(missings,i) != 0 && bits256_nonz(bp->hashes[i]) != 0 )
iguana_blockQ("missings",coin,bp,i,bp->hashes[i],1); iguana_blockQ("missings",coin,bp,i,bp->hashes[i],1);
} }
}
if ( bp->durationscount != 0 ) if ( bp->durationscount != 0 )
{ {
aveduration = (double)bp->totaldurations / bp->durationscount; aveduration = (double)bp->totaldurations / bp->durationscount;

4
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 ) if ( iguana_mapvolatiles(coin,&bp->ramchain) != 0 )
printf("error mapping bundle.[%d]\n",hdrsi); 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)); char str[65]; printf("BALANCES WRITTEN for %d/%d bundles %s\n",coin->balanceswritten,origcount,bits256_str(str,coin->balancehash));
iguana_coinpurge(coin);
if ( strcmp(coin->symbol,"BTC") == 0 && coin->balanceswritten > origcount+10 ) if ( strcmp(coin->symbol,"BTC") == 0 && coin->balanceswritten > origcount+10 )
{ {
int32_t i; int32_t i;
@ -1462,6 +1461,7 @@ int32_t iguana_balanceflush(struct iguana_info *coin,int32_t refhdrsi,int32_t pu
} }
exit(-1); exit(-1);
} }
iguana_coinpurge(coin);
//coin->balanceswritten = iguana_volatileinit(coin); //coin->balanceswritten = iguana_volatileinit(coin);
//iguana_RTramchainfree(coin); //iguana_RTramchainfree(coin);
return(coin->balanceswritten); return(coin->balanceswritten);

Loading…
Cancel
Save