From ab888b2ce68393867f9ae08f838b1a64146981eb Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 2 Apr 2016 13:04:57 -0600 Subject: [PATCH] test --- iguana/iguana_unspents.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index e295e1429..bec6984b9 100755 --- a/iguana/iguana_unspents.c +++ b/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; jbundlescount-1; j++)