Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
ab888b2ce6
  1. 6
      iguana/iguana_unspents.c

6
iguana/iguana_unspents.c

@ -1569,14 +1569,16 @@ int32_t iguana_balanceflush(struct iguana_info *coin,int32_t refhdrsi,int32_t pu
int32_t iguana_balancecalc(struct iguana_info *coin,struct iguana_bundle *bp,int32_t startheight,int32_t endheight)
{
uint32_t starttime; int32_t j=0,flag = 0; struct iguana_bundle *prevbp;
uint32_t starttime; int32_t j=0,dist,flag = 0; struct iguana_bundle *prevbp;
if ( bp->balancefinish > 1 )
{
printf("make sure DB files have this bp.%d\n",bp->hdrsi);
iguana_validateQ(coin,bp);
return(flag);
}
bp->nexttime = (uint32_t)time(NULL);
dist = coin->current != 0 ? (bp->hdrsi - coin->current->hdrsi) : bp->hdrsi;
dist++;
bp->nexttime = (uint32_t)time(NULL) + sqrt(dist);
if ( bp != 0 && coin != 0 && (bp->hdrsi == 0 || (prevbp= coin->bundles[bp->hdrsi-1]) != 0) )
{
for (j=0; j<coin->bundlescount-1; j++)

Loading…
Cancel
Save