Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
3f4e7fa2d1
  1. 5
      iguana/iguana_bundles.c
  2. 6
      iguana/iguana_recv.c

5
iguana/iguana_bundles.c

@ -1123,7 +1123,10 @@ void iguana_bundlestats(struct iguana_info *coin,char *str)
missing++;
if ( bp->speculativecache[j] != 0 )
{
if ( bp->speculativecache[j] != 0 && (block= iguana_blockfind(coin,bp->speculative[j])) != 0 )
block = iguana_blockfind(coin,bp->speculative[j]);
if ( block != 0 )
block->queued = 1;
if ( bp->speculativecache[j] != 0 && block != 0 )
{
block->bundlei = j;
block->hdrsi = bp->hdrsi;

6
iguana/iguana_recv.c

@ -55,7 +55,7 @@ int32_t iguana_sendblockreqPT(struct iguana_info *coin,struct iguana_peer *addr,
coin->numreqsent++;
addr->pendblocks++;
addr->pendtime = (uint32_t)time(NULL);
//if ( 0 && coin->current == bp )
if ( 0 && coin->current == bp )
printf("REQ.%s bundlei.%d hdrsi.%d\n",bits256_str(hexstr,hash2),bundlei,bp!=0?bp->hdrsi:-1);
} else printf("MSG_BLOCK null datalen.%d\n",len);
return(len);
@ -1284,6 +1284,8 @@ int32_t iguana_blockQ(char *argstr,struct iguana_info *coin,struct iguana_bundle
}
return(0);
}
if ( block->queued != 0 )
return(0);
height = block->height;
}
if ( bp != 0 && bp->emitfinish != 0 )
@ -1303,7 +1305,7 @@ int32_t iguana_blockQ(char *argstr,struct iguana_info *coin,struct iguana_bundle
req->height = height;
req->bundlei = bundlei;
char str2[65];
printf("%s %s %s [%d:%d] %d %s %d numranked.%d qsize.%d\n",coin->symbol,argstr,str,bp!=0?bp->hdrsi:-1,bundlei,req->height,bits256_str(str2,hash2),coin->blocks.recvblocks,coin->peers.numranked,queue_size(Q));
//printf("%s %s %s [%d:%d] %d %s %d numranked.%d qsize.%d\n",coin->symbol,argstr,str,bp!=0?bp->hdrsi:-1,bundlei,req->height,bits256_str(str2,hash2),coin->blocks.recvblocks,coin->peers.numranked,queue_size(Q));
if ( Q == &coin->blocksQ )
{
if ( (n= queue_size(Q)) > 100000 )

Loading…
Cancel
Save