From 9ffa4bd340814acb3e6bb1334b57638662f2bf2f Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 14 Aug 2016 17:39:10 -0300 Subject: [PATCH] test --- iguana/iguana777.c | 1 + iguana/iguana_spendvectors.c | 12 ++++++------ iguana/iguana_unspents.c | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/iguana/iguana777.c b/iguana/iguana777.c index e7b223d36..ed12085ff 100755 --- a/iguana/iguana777.c +++ b/iguana/iguana777.c @@ -536,6 +536,7 @@ int32_t iguana_utxogen(struct supernet_info *myinfo,struct iguana_info *coin,int coin->spendvectorsaved = (uint32_t)time(NULL); coin->spendvalidated = 0; printf("%s UTXOGEN spendvectorsaved <- %u\n",coin->symbol,coin->spendvectorsaved); + iguana_utxoaddr_gen(myinfo,coin,(coin->bundlescount - 1) * coin->chain->bundlesize); } else { diff --git a/iguana/iguana_spendvectors.c b/iguana/iguana_spendvectors.c index 1a05f0bf1..32616cd0f 100755 --- a/iguana/iguana_spendvectors.c +++ b/iguana/iguana_spendvectors.c @@ -612,14 +612,14 @@ int32_t iguana_volatilesinit(struct iguana_info *coin) struct sha256_vstate vstate,bstate; int32_t i,from_ro,numpkinds,numunspents; struct iguana_bundle *bp; struct iguana_block *block; uint32_t crc,filecrc; FILE *fp; char crcfname[512],str[65],str2[65],buf[2048]; from_ro = 1; - for (i=0; ibalanceswritten; i++) + for (i=0; ibundlescount; i++)//balanceswritten; i++) { if ( (bp= coin->bundles[i]) == 0 ) - break; + continue; if ( bp->emitfinish <= 1 || (i > 0 && bp->utxofinish <= 1) ) { printf("hdrsi.[%d] emitfinish.%u utxofinish.%u\n",i,bp->emitfinish,bp->utxofinish); - break; + continue; } iguana_volatilesmap(coin,&bp->ramchain); if ( from_ro != 0 && (bp->ramchain.from_ro == 0 || (bp->hdrsi > 0 && bp->ramchain.from_roX == 0) || bp->ramchain.from_roA == 0 || bp->ramchain.from_roU == 0) ) @@ -628,12 +628,12 @@ int32_t iguana_volatilesinit(struct iguana_info *coin) from_ro = 0; } } - if ( i < coin->balanceswritten-1 ) + /*if ( i < coin->balanceswritten-1 ) { printf("TRUNCATE balances written.%d -> %d\n",coin->balanceswritten,i); iguana_truncatebalances(coin); } - else + else*/ { coin->balanceswritten = i; //printf("verify crc and sha256 hash for %d of %d\n",i,coin->balanceswritten); @@ -912,7 +912,7 @@ int32_t iguana_balanceflush(struct supernet_info *myinfo,struct iguana_info *coi } } char str[65]; printf("BALANCES WRITTEN for %d orig.%d bundles %s\n",coin->balanceswritten,coin->origbalanceswritten,bits256_str(str,coin->balancehash)); - iguana_utxoaddr_gen(myinfo,coin,(coin->balanceswritten - 1) * coin->chain->bundlesize); + //iguana_utxoaddr_gen(myinfo,coin,(coin->balanceswritten - 1) * coin->chain->bundlesize); if ( 0 && coin->balanceswritten > coin->origbalanceswritten+10 ) // strcmp(coin->symbol,"BTC") == 0 && { coin->active = 0; diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index 5bfb0347f..32fd840ed 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -1168,7 +1168,7 @@ int64_t iguana_utxoaddr_gen(struct supernet_info *myinfo,struct iguana_info *coi { if ( strcmp("BTC",coin->symbol) != 0 ) errs = iguana_utxoaddr_validate(myinfo,coin,height); - printf("nogen HIST BALANCE %.8f errs %d\n",dstr(coin->histbalance),errs); + printf("nogen %s HIST BALANCE %.8f errs %d\n",fname2,dstr(coin->histbalance),errs); if ( coin->histbalance > 0 ) return(coin->histbalance); }