diff --git a/iguana/iguana_realtime.c b/iguana/iguana_realtime.c index b1ea89152..e0c3d4479 100755 --- a/iguana/iguana_realtime.c +++ b/iguana/iguana_realtime.c @@ -377,8 +377,6 @@ int32_t iguana_realtime_update(struct supernet_info *myinfo,struct iguana_info * iguana_RTspendvectors(myinfo,coin,bp); //portable_mutex_unlock(&coin->RTmutex); coin->RTgenesis = (uint32_t)time(NULL); - if ( coin->utxoaddrs == 0 ) - iguana_utxoaddr_gen(coin,1); } } else diff --git a/iguana/iguana_spendvectors.c b/iguana/iguana_spendvectors.c index 67860cf7e..df0ac1eb9 100755 --- a/iguana/iguana_spendvectors.c +++ b/iguana/iguana_spendvectors.c @@ -893,6 +893,8 @@ int32_t iguana_balanceflush(struct iguana_info *coin,int32_t refhdrsi) } } char str[65]; printf("BALANCES WRITTEN for %d orig.%d bundles %s\n",coin->balanceswritten,coin->origbalanceswritten,bits256_str(str,coin->balancehash)); + if ( coin->utxoaddrs == 0 ) + iguana_utxoaddr_gen(coin,1); 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 fa7cd0b78..9f598bc9d 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -919,8 +919,6 @@ int64_t iguana_utxoaddr_gen(struct iguana_info *coin,int32_t maketable) for (hdrsi=0; hdrsibundlescount-1; hdrsi++) if ( (bp= coin->bundles[hdrsi]) != 0 && (rdata= bp->ramchain.H.data) != 0 ) { - iguana_volatilespurge(coin,&bp->ramchain); - iguana_volatilesmap(coin,&bp->ramchain); tablesize += rdata->numpkinds; } printf("allocate UTXOADDRS[%d]\n",tablesize); diff --git a/iguana/iguana_volatiles.c b/iguana/iguana_volatiles.c index 1cf1d6210..cdca50e8a 100755 --- a/iguana/iguana_volatiles.c +++ b/iguana/iguana_volatiles.c @@ -372,7 +372,7 @@ int32_t iguana_volatilesmap(struct iguana_info *coin,struct iguana_ramchain *ram ramchain->Uextras = (void *)((long)ramchain->lastspendsfileptr + sizeof(numhdrsi) + 2*sizeof(bits256)); ramchain->from_roU = (iter == 0); uint32_t unspentind,nonz=0; struct iguana_unspent *U; struct iguana_utxo *U2; - if ( 1 ) + if ( iter == 1 && (ramchain->height % 100000) == 0 ) { U2 = ramchain->Uextras; U = RAMCHAIN_PTR(ramchain->H.data,Uoffset); @@ -382,8 +382,8 @@ int32_t iguana_volatilesmap(struct iguana_info *coin,struct iguana_ramchain *ram nonz++; //printf("[%d] u%d: (p%u %.8f) from.%d lock.%d prev.%u spent.%d\n",ramchain->height/coin->chain->bundlesize,unspentind,U[unspentind].pkind,dstr(U[unspentind].value),U2[unspentind].fromheight,U2[unspentind].lockedflag,U2[unspentind].prevunspentind,U2[unspentind].spentflag); } + printf("nonz.%d %s volatilesmap.[%d] %p %p\n",nonz,fname,ramchain->height/coin->chain->bundlesize,ramchain->debitsfileptr,ramchain->lastspendsfileptr); } - printf("nonz.%d %s volatilesmap.[%d] %p %p\n",nonz,fname,ramchain->height/coin->chain->bundlesize,ramchain->debitsfileptr,ramchain->lastspendsfileptr); err = 0; } else printf("ramchain map error2 balanceswritten %d vs %d hashes %x %x\n",coin->balanceswritten,numhdrsi,coin->balancehash.uints[0],balancehash.uints[0]); } else printf("ramchain map error3 %s\n",fname);