Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
25e5941a5e
  1. 2
      iguana/iguana777.c
  2. 5
      iguana/iguana_bundles.c
  3. 3
      iguana/iguana_recv.c
  4. 4
      iguana/iguana_unspents.c
  5. 2
      iguana/main.c

2
iguana/iguana777.c

@ -600,7 +600,7 @@ void iguana_helper(void *arg)
//portable_mutex_lock(&myinfo->allcoins_mutex);
HASH_ITER(hh,myinfo->allcoins,coin,tmp)
{
if ( coin->spendvectorsaved == 1 )
if ( coin->spendvectorsaved == 1 && coin->firstRTheight == 0 )
iguana_utxogen(myinfo,coin,helperid,0);
else if ( coin->spendvectorsaved > 1 && (coin->spendvalidated & (1 << helperid)) == 0 )
{

5
iguana/iguana_bundles.c

@ -218,7 +218,7 @@ int32_t iguana_bundlehash2add(struct iguana_info *coin,struct iguana_block **blo
}
else
{
if ( coin->RTheight > 0 && bp->bundleheight+bundlei > coin->firstRTheight )
//if ( coin->RTheight > 0 && bp->bundleheight+bundlei > coin->firstRTheight )
{
if ( bundlei > 1 )
bundlei -= 2;
@ -229,7 +229,8 @@ int32_t iguana_bundlehash2add(struct iguana_info *coin,struct iguana_block **blo
return(-1);
} //else printf("couldnt find block at %d\n",bp->bundleheight+bundlei);
}
else if ( bundlei > 0 )
//else if ( bundlei > 0 )
if ( bp->blocks[bundlei] != 0 )
{
printf("bp.[%d]->blocks[%d] mismatch %p != %p\n",bp->hdrsi,bundlei,bp->blocks[bundlei],block);
bp->blocks[bundlei] = 0;

3
iguana/iguana_recv.c

@ -503,6 +503,8 @@ void iguana_gotblockM(struct iguana_info *coin,struct iguana_peer *addr,struct i
}*/
} //else printf("cant save block\n");
}
if ( txdata->zblock.fpos == 0 )
{
numtx = origtxdata->zblock.RO.txn_count;
iguana_RTrawdata(coin,txdata->zblock.RO.hash2,data,&recvlen,&numtx,0);
req->zblock = txdata->zblock;
@ -517,6 +519,7 @@ void iguana_gotblockM(struct iguana_info *coin,struct iguana_peer *addr,struct i
}
req->addr = addr;
queue_enqueue("recvQ",&coin->recvQ,&req->DL,0);
}
}
void iguana_gottxidsM(struct iguana_info *coin,struct iguana_peer *addr,bits256 *txids,int32_t n)

4
iguana/iguana_unspents.c

@ -1185,7 +1185,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 %s HIST BALANCE %s %.8f errs %d\n",fname2,bits256_str(str,coin->utxoaddrhash),dstr(coin->histbalance),errs);
if ( errs == 0 && coin->histbalance > 0 )
if ( errs == 0 && coin->histbalance > 0 && height > 0 )
{
coin->firstRTheight = coin->RTheight = height;
iguana_RTreset(coin);
@ -1308,7 +1308,7 @@ continue;
printf("validating %s HIST BALANCE %s %.8f errs %d\n",fname2,bits256_str(str,coin->utxoaddrhash),dstr(coin->histbalance),errs);
errs = iguana_utxoaddr_validate(myinfo,coin,height);
printf("gen %s HIST BALANCE %s %.8f errs %d\n",fname2,bits256_str(str,coin->utxoaddrhash),dstr(coin->histbalance),errs);
if ( errs != 0 )
if ( errs != 0 || height == 0 )
{
printf("delete bad utxoaddr files\n");
OS_removefile(fname,0);

2
iguana/main.c

@ -408,7 +408,7 @@ void mainloop(struct supernet_info *myinfo)
//portable_mutex_lock(&myinfo->allcoins_mutex);
HASH_ITER(hh,myinfo->allcoins,coin,tmp)
{
if ( coin->RTheight == 0 && coin->current != 0 && coin->active != 0 && coin->started != 0 )
if ( coin->RTheight == 0 && coin->firstRTheight == 0 && coin->current != 0 && coin->active != 0 && coin->started != 0 )
{
isRT *= coin->isRT;
if ( coin->peers != 0 )

Loading…
Cancel
Save