Browse Source

test

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

14
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); priority += 1 + (bp == coin->current);
} }
//if ( bp == coin->current ) if ( queue_size(&coin->priorityQ) < bp->n/(dist+1) )
// priority++; {
} for (i=0; i<bp->n; i++)
if ( bp == coin->current && queue_size(&coin->priorityQ) < bp->n ) if ( GETBIT(missings,i) != 0 && bits256_nonz(bp->hashes[i]) != 0 )
{ iguana_blockQ("missings",coin,bp,i,bp->hashes[i],1);
for (i=0; i<bp->n; 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 ) if ( bp->durationscount != 0 )
{ {

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