From d90d5dab19780796bb43045f8fcfb1733b27237d Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 4 Apr 2016 16:50:21 -0500 Subject: [PATCH] test --- iguana/iguana_unspents.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index 45b38d011..f3cf0836e 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -1080,6 +1080,7 @@ int32_t iguana_RTutxo(struct iguana_info *coin,struct iguana_bundle *bp,struct i s = &S[spendind]; if ( s->external != 0 && s->prevout >= 0 ) { + continue; double startmillis = OS_milliseconds(); static double totalmillis; static int32_t num; if ( (spentbp= iguana_externalspent(coin,&prevhash,&spent_unspentind,RTramchain,bp->hdrsi,s,2)) == 0 || spent_unspentind == 0 || spent_unspentind >= spentbp->ramchain.H.data->numunspents || spentbp->hdrsi < 0 || spentbp->hdrsi >= bp->hdrsi || spentbp == bp ) { @@ -1252,6 +1253,7 @@ int32_t iguana_volatileinit(struct iguana_info *coin) struct sha256_vstate vstate; int32_t i,from_ro,numpkinds,numunspents; struct iguana_bundle *bp; uint32_t crc,filecrc; FILE *fp; char crcfname[512],str[65],str2[65],buf[2048]; from_ro = 1; + printf("volatile init\n"); for (i=0; ibalanceswritten; i++) { if ( (bp= coin->bundles[i]) == 0 || bp->emitfinish <= 1 || bp->utxofinish <= 1 ) @@ -1479,14 +1481,17 @@ int32_t iguana_realtime_update(struct iguana_info *coin) if ( coin->RTgenesis != 0 && n >= bp->n ) break; } - if ( coin->RTgenesis == 0 && n == coin->RTheight ) + if ( coin->RTgenesis == 0) { - printf("RTgenesis verified\n"); - coin->RTgenesis = (uint32_t)time(NULL); + if ( n == coin->RTheight ) + { + printf("RTgenesis verified\n"); + coin->RTgenesis = (uint32_t)time(NULL); + } else printf("RTgenesis failed to verify\n"); } } - if ( dest != 0 ) - printf(">>>>flag.%d RT.%d:%d hwm.%d L.%d T.%d U.%d S.%d P.%d X.%d -> size.%ld\n",flag,coin->RTheight,n,coin->blocks.hwmchain.height,coin->longestchain,dest->H.txidind,dest->H.unspentind,dest->H.spendind,dest->pkind,dest->externalind,(long)dest->H.data->allocsize); + if ( dest != 0 && flag != 0 ) + printf("<<<< flag.%d RT.%d:%d hwm.%d L.%d T.%d U.%d S.%d P.%d X.%d -> size.%ld\n",flag,coin->RTheight,n,coin->blocks.hwmchain.height,coin->longestchain,dest->H.txidind,dest->H.unspentind,dest->H.spendind,dest->pkind,dest->externalind,(long)dest->H.data->allocsize); return(flag); }