Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
0dc6810074
  1. 3
      iguana/iguana777.c
  2. 2
      iguana/iguana_blocks.c
  3. 4
      iguana/iguana_bundles.c
  4. 3
      iguana/iguana_recv.c

3
iguana/iguana777.c

@ -562,7 +562,8 @@ void iguana_coinloop(void *arg)
coin->isRT = 1;
if ( coin->polltimeout > 100 )
coin->polltimeout = 100;
coin->MAXPEERS = 8;
if ( coin->MAXPEERS > 32 )
coin->MAXPEERS = 32;
}
if ( coin->isRT != 0 && coin->current != 0 && coin->numverified >= coin->current->hdrsi )
{

2
iguana/iguana_blocks.c

@ -395,7 +395,7 @@ struct iguana_block *_iguana_chainlink(struct iguana_info *coin,struct iguana_bl
}
iguana_bundlehash2add(coin,0,bp,block->height % coin->chain->bundlesize,block->RO.hash2);
}
if ( coin->started != 0 && (block->height % coin->chain->bundlesize) == coin->minconfirms && (block->height > coin->longestchain-coin->chain->bundlesize*2 || ((block->height / coin->chain->bundlesize) % 10) == 9) )
if ( coin->started != 0 && (block->height % coin->chain->bundlesize) == coin->minconfirms )//&& (block->height > coin->longestchain-coin->chain->bundlesize*2 || ((block->height / coin->chain->bundlesize) % 10) == 9) )
{
//printf("savehdrs.[%d] ht.%d\n",bp->hdrsi,block->height);
iguana_savehdrs(coin);

4
iguana/iguana_bundles.c

@ -848,7 +848,7 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru
{
if ( bp->balancefinish == 0 )
{
bp->queued = 0;
//bp->queued = 0;
iguana_balancesQ(coin,bp);
}
return(1);
@ -858,7 +858,7 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru
if ( (retval= iguana_bundlefinish(coin,bp)) > 0 )
{
//printf("moved to balancesQ.%d bundleiters.%d\n",bp->hdrsi,bp->bundleheight);
bp->queued = 0;
//bp->queued = 0;
return(0);
} //else printf("finish incomplete.%d\n",bp->hdrsi);
}

3
iguana/iguana_recv.c

@ -694,7 +694,7 @@ void iguana_checklongestchain(struct iguana_info *coin,struct iguana_bundle *bp,
int32_t i; struct iguana_peer *addr;
if ( num > 3 && num < bp->n )
{
if ( coin->longestchain > bp->bundleheight+num+3 )
if ( coin->longestchain > bp->bundleheight+num+coin->chain->minconfirms )
{
printf("strange.%d suspicious longestchain.%d vs [%d:%d] %d bp->n %d\n",coin->longestchain_strange,coin->longestchain,bp->hdrsi,num,bp->bundleheight+num,bp->n);
if ( coin->longestchain_strange++ > 10 )
@ -905,6 +905,7 @@ struct iguana_bundlereq *iguana_recvblockhashes(struct iguana_info *coin,struct
struct iguana_bundlereq *iguana_recvblock(struct iguana_info *coin,struct iguana_peer *addr,struct iguana_bundlereq *req,struct iguana_block *origblock,int32_t numtx,int32_t datalen,int32_t recvlen,int32_t *newhwmp)
{
struct iguana_bundle *bp=0,*prev; int32_t numsaved=0,bundlei = -2; struct iguana_block *block,*tmpblock; char str[65]; bits256 hash2;
iguana_blockQ("prev",coin,0,-1,origblock->RO.prev_block,1);
if ( (bp= iguana_bundleset(coin,&block,&bundlei,origblock)) != 0 && bp == coin->current && block != 0 && bp->speculative != 0 && bundlei >= 0 )
{
if ( bp->speculative != 0 && bp->numspec <= bundlei )

Loading…
Cancel
Save