Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
968d43f9aa
  1. 8
      gecko/gecko.c
  2. 7
      iguana/iguana777.c
  3. 24
      iguana/iguana_recv.c
  4. 6
      iguana/iguana_unspents.c
  5. 2
      iguana/main.c

8
gecko/gecko.c

@ -47,10 +47,10 @@ void gecko_iteration(struct supernet_info *myinfo,struct iguana_info *btcd,struc
longesthdrsi = virt->longestchain / virt->chain->bundlesize;
if ( (bp= virt->bundles[hwmhdrsi]) != 0 )
{
iguana_RTspendvectors(myinfo,virt,bp);
iguana_RTramchainalloc("RTbundle",virt,bp);
iguana_update_balances(virt);
iguana_realtime_update(myinfo,virt);
//iguana_RTspendvectors(myinfo,virt,bp);
//iguana_RTramchainalloc("RTbundle",virt,bp);
//iguana_update_balances(virt);
//iguana_realtime_update(myinfo,virt);
}
if ( 0 && hwmhdrsi <= longesthdrsi )//&& virt->blocks.hwmchain.height < virt->longestchain-1 )
{

7
iguana/iguana777.c

@ -402,7 +402,6 @@ int32_t iguana_helperB(struct iguana_info *coin,int32_t helperid,struct iguana_b
//if ( bp != coin->current )
{
iguana_ramchain_prefetch(coin,&bp->ramchain,7);
printf("convert.%d [%d]\n",convertflag,bp->hdrsi);
if ( convertflag == 0 )
{
bp->converted = 1;
@ -543,11 +542,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);
if ( iguana_utxoaddr_gen(myinfo,coin,(coin->bundlescount - 1) * coin->chain->bundlesize) < 0 )
{
printf("call again \n");
iguana_utxoaddr_gen(myinfo,coin,(coin->bundlescount - 1) * coin->chain->bundlesize);
}
iguana_utxoaddr_gen(myinfo,coin,(coin->bundlescount - 1) * coin->chain->bundlesize);
}
else
{

24
iguana/iguana_recv.c

@ -552,7 +552,7 @@ void iguana_gotheadersM(struct iguana_info *coin,struct iguana_peer *addr,struct
void iguana_gotblockhashesM(struct iguana_info *coin,struct iguana_peer *addr,bits256 *blockhashes,int32_t n)
{
struct iguana_bundlereq *req; int32_t i,num;
struct iguana_bundlereq *req; int32_t i,num,j,flag; struct iguana_bundle *bp;
if ( addr != 0 )
{
addr->recvhdrs++;
@ -576,7 +576,27 @@ void iguana_gotblockhashesM(struct iguana_info *coin,struct iguana_peer *addr,bi
if ( coin->RTheight > 0 )
{
for (i=1; i<n; i++)
iguana_sendblockreqPT(coin,addr,0,-1,blockhashes[i],0);
{
flag = 0;
if ( (bp= coin->current) != 0 )
{
for (j=0; j<bp->n; j++)
{
if ( j < bp->numspec && bp->speculative != 0 && bits256_cmp(bp->speculative[j],blockhashes[i]) == 0 )
{
flag = 1;
break;
}
if ( bits256_cmp(bp->hashes[j],blockhashes[i]) == 0 )
{
flag = 1;
break;
}
}
}
if ( flag == 0 )
iguana_sendblockreqPT(coin,addr,0,-1,blockhashes[i],0);
}
}
else if ( n > coin->chain->bundlesize )
iguana_sendblockreqPT(coin,addr,0,-1,blockhashes[1],0);

6
iguana/iguana_unspents.c

@ -1122,7 +1122,7 @@ int32_t iguana_utxoaddr_check(struct supernet_info *myinfo,struct iguana_info *c
}
good++;
if ( ((good + bad) % 1000) == 0 )
printf("%s utxoaddr validate good.%d bad.%d\n",coin->symbol,good,bad);
printf("%s utxoaddr validate good.%d bad.%d | (if this is taking too long, just exit and restart iguana)\n",coin->symbol,good,bad);
return(0);
}
@ -1161,8 +1161,8 @@ int32_t iguana_utxoaddr_validate(struct supernet_info *myinfo,struct iguana_info
iguana_rwutxoaddr(0,ind,item,&UA);
errs += iguana_utxoaddr_check(myinfo,coin,lastheight,unspents,max,&UA);
total++;
if ( (total % 1000) == 0 )
fprintf(stderr,".");
//if ( (total % 1000) == 0 )
// fprintf(stderr,".");
}
}
}

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->current != 0 && coin->active != 0 && coin->started != 0 )
if ( coin->RTheight == 0 && coin->current != 0 && coin->active != 0 && coin->started != 0 )
{
isRT *= coin->isRT;
if ( coin->peers != 0 )

Loading…
Cancel
Save