Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
9ffa4bd340
  1. 1
      iguana/iguana777.c
  2. 12
      iguana/iguana_spendvectors.c
  3. 2
      iguana/iguana_unspents.c

1
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
{

12
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; i<coin->balanceswritten; i++)
for (i=0; i<coin->bundlescount; 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;

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

Loading…
Cancel
Save