Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
ad9f82a458
  1. 16
      iguana/iguana_bundles.c
  2. 6
      iguana/iguana_recv.c

16
iguana/iguana_bundles.c

@ -529,9 +529,9 @@ int32_t iguana_bundleissue(struct iguana_info *coin,struct iguana_bundle *bp,int
if ( now > block->issued+lag )
{
counter++;
printf("[%d:%d] ",bp->hdrsi,i);
if ( priority != 0 )
{
printf("[%d:%d] ",bp->hdrsi,i);
iguana_blockQ("kick",coin,bp,i,block->RO.hash2,bp == coin->current && now > block->issued+lag);
if ( bp == coin->current && now > block->issued+lag*3 && (addr= coin->peers.ranked[rand() % numpeers]) != 0 )
iguana_sendblockreqPT(coin,addr,bp,i,block->RO.hash2,0);
@ -555,7 +555,7 @@ int32_t iguana_bundleissue(struct iguana_info *coin,struct iguana_bundle *bp,int
if ( block->issued == 0 || now > block->issued+lag )
{
block->numrequests++;
if ( bp == coin->current )
//if ( bp == coin->current )
printf("[%d:%d].%x ",bp->hdrsi,i,block->fpipbits);
iguana_blockQ("kick",coin,bp,i,block->RO.hash2,bp == coin->current);
bp->issued[i] = block->issued = now;
@ -567,17 +567,17 @@ int32_t iguana_bundleissue(struct iguana_info *coin,struct iguana_bundle *bp,int
// n++;
}
}
else if ( bits256_nonz(bp->hashes[i]) > 0 && now > bp->issued[i]+lag )
else if ( bits256_nonz(bp->hashes[i]) != 0 && now > bp->issued[i]+lag )
{
if ( bp == coin->current )
//if ( bp == coin->current )
printf("[%d:%d].%x ",bp->hdrsi,i,block->fpipbits);
iguana_blockQ("kick",coin,bp,i,bp->hashes[i],bp == coin->current);
bp->issued[i] = now;
counter++;
}
else if ( bp->speculative != 0 && bits256_nonz(bp->speculative[i]) > 0 && now > bp->issued[i]+lag )
else if ( bp->speculative != 0 && bits256_nonz(bp->speculative[i]) != 0 && now > bp->issued[i]+lag )
{
if ( bp == coin->current )
//if ( bp == coin->current )
printf("[%d:%d].%x ",bp->hdrsi,i,block->fpipbits);
iguana_blockQ("kick",coin,bp,i,bp->speculative[i],0);
bp->issued[i] = now;
@ -632,7 +632,7 @@ int32_t iguana_bundlehdr(struct iguana_info *coin,struct iguana_bundle *bp,int32
if ( now > bp->issued[i]+10 )
{
bp->issued[i] = now;
//printf("speculative.[%d:%d]\n",bp->hdrsi,i);
printf("speculative.[%d:%d]\n",bp->hdrsi,i);
iguana_blockQ("speculative",coin,0,-1,bp->speculative[i],0);
}
break;
@ -954,7 +954,7 @@ void iguana_bundlestats(struct iguana_info *coin,char *str)
else if ( now > block->issued+10 )
{
block->issued = now;
//printf("submit speculative [%d:%d]\n",bp->hdrsi,j);
printf("submit speculative [%d:%d]\n",bp->hdrsi,j);
iguana_blockQ("spec",coin,0,-1,block->RO.hash2,0);
}
}

6
iguana/iguana_recv.c

@ -605,8 +605,8 @@ struct iguana_bundlereq *iguana_recvblockhashes(struct iguana_info *coin,struct
return(req);
else if ( bp == coin->current )
{
for (i=0; i<bp->n; i++)
iguana_blockQ("reissue",coin,bp,i,bp->hashes[i],0);
//for (i=0; i<bp->n; i++)
// iguana_blockQ("reissue",coin,bp,i,bp->hashes[i],0);
}
//printf("done allhashes\n");
}
@ -762,7 +762,7 @@ struct iguana_bundlereq *iguana_recvblock(struct iguana_info *coin,struct iguana
{
if ( block != origblock )
iguana_blockcopy(coin,block,origblock);
if ( block->newtx != 0 )
if ( block->newtx != 0 && 0 )
{
if ( (prev= iguana_blockfind(coin,block->RO.prev_block)) == 0 )
prev = iguana_blockhashset(coin,-1,block->RO.prev_block,1);

Loading…
Cancel
Save