Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
1b2887515e
  1. 2
      iguana/iguana_realtime.c
  2. 2
      iguana/iguana_spendvectors.c
  3. 2
      iguana/iguana_unspents.c
  4. 4
      iguana/iguana_volatiles.c

2
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

2
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;

2
iguana/iguana_unspents.c

@ -919,8 +919,6 @@ int64_t iguana_utxoaddr_gen(struct iguana_info *coin,int32_t maketable)
for (hdrsi=0; hdrsi<coin->bundlescount-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);

4
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);

Loading…
Cancel
Save