Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
da731d27c8
  1. 11
      iguana/iguana_recv.c

11
iguana/iguana_recv.c

@ -475,7 +475,10 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int
{
block->numrequests++;
if ( bp->hdrsi == starti )
{
printf("bundleQ issue [%d:%d]\n",bp->hdrsi,i);
iguana_blockQ(coin,bp,i,block->RO.hash2,1);
}
iguana_blockQ(coin,bp,i,block->RO.hash2,0);
bp->issued[i] = block->issued = now;
counter++;
@ -507,13 +510,13 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int
//printf("(%x:%x) ",(uint32_t)block->RO.hash2.ulongs[3],(uint32_t)bp->hashes[i].ulongs[3]);
if ( iguana_blockvalidate(coin,&valid,block,1) != 0 || (bp->bundleheight+i > 0 && bits256_nonz(block->RO.prev_block) == 0) )
{
char str[65]; printf(">>>>>>> null prevblock error at ht.%d patch.(%s) and reissue\n",bp->bundleheight+i,bits256_str(str,block->RO.prev_block));
//char str[65]; printf(">>>>>>> null prevblock error at ht.%d patch.(%s) and reissue\n",bp->bundleheight+i,bits256_str(str,block->RO.prev_block));
block->queued = 0;
block->fpipbits = 0;
block->issued = 0;
bp->issued[i] = 0;
iguana_blockQ(coin,bp,i,block->RO.hash2,bp->hdrsi == starti);
iguana_bundleQ(coin,bp,counter == 0 ? bp->n*5 : bp->n*2);
//iguana_blockQ(coin,bp,i,block->RO.hash2,bp->hdrsi == starti);
//iguana_bundleQ(coin,bp,counter == 0 ? bp->n*5 : bp->n*2);
return(0);
}
} else printf("error getting block (%d:%d) %p vs %p\n",bp->hdrsi,i,block,iguana_blockfind(coin,bp->hashes[i]));
@ -1099,7 +1102,7 @@ int32_t iguana_pollQsPT(struct iguana_info *coin,struct iguana_peer *addr)
int32_t iguana_reqblocks(struct iguana_info *coin)
{
int32_t hdrsi,lflag,n,numissued,bundlei,flag = 0; bits256 hash2; struct iguana_block *next,*block; struct iguana_bundle *bp; struct iguana_peer *addr;
if ( 1 && (bp= coin->current) != 0 && bp->numsaved < bp->n ) // queue_size(&coin->priorityQ) == 0 &&
if ( 0 && (bp= coin->current) != 0 && bp->numsaved < bp->n ) // queue_size(&coin->priorityQ) == 0 &&
{
for (hdrsi=numissued=0; hdrsi<coin->MAXBUNDLES && coin->current->hdrsi+hdrsi<coin->bundlescount && numissued<100; hdrsi++)
{

Loading…
Cancel
Save