Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
27892b8da3
  1. 6
      iguana/iguana777.c
  2. 2
      iguana/iguana_recv.c
  3. 14
      iguana/iguana_unspents.c
  4. 2
      iguana/main.c

6
iguana/iguana777.c

@ -439,7 +439,7 @@ int32_t iguana_utxogen(struct iguana_info *coin,int32_t helperid,int32_t convert
}
while ( (n= iguana_convertfinished(coin)) < max )
{
printf("helperid.%d convertfinished.%d vs max %d bundlescount.%d\n",helperid,n,max,coin->bundlescount);
//printf("helperid.%d convertfinished.%d vs max %d bundlescount.%d\n",helperid,n,max,coin->bundlescount);
sleep(IGUANA_NUMHELPERS+3);
}
if ( helperid == 0 )
@ -462,7 +462,7 @@ int32_t iguana_utxogen(struct iguana_info *coin,int32_t helperid,int32_t convert
coin->balanceflush = coin->balanceswritten;
} else printf("error saving spendvectors\n");
}
printf("helper.%d check validates\n",helperid);
//printf("helper.%d check validates\n",helperid);
if ( helperid < incr )
{
for (hdrsi=helperid; hdrsi<max; hdrsi+=incr)
@ -473,7 +473,7 @@ int32_t iguana_utxogen(struct iguana_info *coin,int32_t helperid,int32_t convert
{
printf("validate.[%d] error. refresh page or restart iguana and it should regenerate\n",bp->hdrsi);
exit(-1);
} else printf("helperid.%d validated.[%d]\n",helperid,hdrsi);
} //else printf("helperid.%d validated.[%d]\n",helperid,hdrsi);
}
}
/*while ( iguana_validated(coin) < max || iguana_utxofinished(coin) < max || iguana_balancefinished(coin) < max )

2
iguana/iguana_recv.c

@ -815,7 +815,7 @@ struct iguana_bundlereq *iguana_recvblockhdrs(struct iguana_info *coin,struct ig
// printf("blockhash[%d] cant be found n.%d\n",i,n);
}
char str[65];
if ( bp == coin->current )
if ( 0 && bp == coin->current )
printf("i.%d n.%d match.%d blockhdrs.%s hdrsi.%d\n",i,n,match,bits256_str(str,blocks[0].RO.hash2),firstbp!=0?firstbp->hdrsi:-1);
if ( firstbp != 0 && match == coin->chain->bundlesize-1 && n == firstbp->n )
{

14
iguana/iguana_unspents.c

@ -1286,7 +1286,7 @@ 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;
printf("start volatilesinit\n");
//printf("start volatilesinit\n");
for (i=0; i<coin->balanceswritten; i++)
{
if ( (bp= coin->bundles[i]) == 0 )
@ -1299,7 +1299,7 @@ int32_t iguana_volatilesinit(struct iguana_info *coin)
if ( bp->ramchain.from_ro == 0 || bp->ramchain.from_roX == 0 || bp->ramchain.from_roA == 0 || bp->ramchain.from_roU == 0 )
from_ro = 0;
}
printf("volatiles i.%d\n",i);
//printf("volatiles i.%d\n",i);
if ( i < coin->balanceswritten )
{
printf("TRUNCATE balances written.%d -> %d\n",coin->balanceswritten,i);
@ -1307,7 +1307,7 @@ int32_t iguana_volatilesinit(struct iguana_info *coin)
}
else
{
printf("verify crc and sha256 hash for %d of %d\n",i,coin->balanceswritten);
//printf("verify crc and sha256 hash for %d of %d\n",i,coin->balanceswritten);
vupdate_sha256(balancehash.bytes,&vstate,0,0);
vupdate_sha256(allbundles.bytes,&bstate,0,0);
filecrc = 0;
@ -1381,11 +1381,11 @@ int32_t iguana_volatilesinit(struct iguana_info *coin)
iguana_bundlestats(coin,buf,IGUANA_DEFAULTLAG);
if ( (bp= coin->bundles[coin->balanceswritten-1]) != 0 && (block= bp->blocks[bp->n-1]) != 0 )
{
char str[65];
printf("set hwmchain.%d <- %s %p\n",bp->bundleheight+bp->n-1,bits256_str(str,bp->hashes[bp->n-1]),block);
//char str[65];
//printf("set hwmchain.%d <- %s %p\n",bp->bundleheight+bp->n-1,bits256_str(str,bp->hashes[bp->n-1]),block);
coin->blocks.hwmchain = *block;
}
printf("end volatilesinit\n");
//printf("end volatilesinit\n");
return(coin->balanceswritten);
}
@ -1888,7 +1888,7 @@ int32_t iguana_realtime_update(struct iguana_info *coin)
struct iguana_block *block=0; struct iguana_blockRO *B; struct iguana_ramchain *dest=0,blockR;
if ( coin->current != 0 && (coin->blocks.hwmchain.height % coin->chain->bundlesize) == coin->chain->bundlesize-1 )
{
printf("RT edge case\n");
//printf("RT edge case\n");
}
if ( coin->RTheight > 0 && coin->spendvectorsaved != 1 && coin->bundlescount-1 != coin->balanceswritten )
{

2
iguana/main.c

@ -441,7 +441,7 @@ void mainloop(struct supernet_info *myinfo)
else
{
coin->spendvectorsaved = (uint32_t)time(NULL);
printf("already done UTXOGEN (%d %d) (%d %d)\n",iguana_utxofinished(coin),n,iguana_balancefinished(coin),n);
//printf("already done UTXOGEN (%d %d) (%d %d)\n",iguana_utxofinished(coin),n,iguana_balancefinished(coin),n);
}
} //else printf("only emit.%d vs %d\n",iguana_emitfinished(coin),n);
}

Loading…
Cancel
Save