Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
1c425c594b
  1. 2
      iguana/iguana_blocks.c
  2. 4
      iguana/iguana_recv.c

2
iguana/iguana_blocks.c

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

4
iguana/iguana_recv.c

@ -1030,7 +1030,7 @@ int32_t iguana_reqhdrs(struct iguana_info *coin)
{
if ( (bp= coin->bundles[i]) != 0 && (bp->numhashes < bp->n || i == coin->bundlescount-1) && (bp->speculative == 0 || bp->numspec < bp->n) )
{
lag = 10;
lag = 30;
if ( bp->bundleheight+bp->numhashes < coin->longestchain && time(NULL) > bp->issuetime+lag )
{
//printf("LAG.%ld hdrsi.%d numhashes.%d:%d needhdrs.%d qsize.%d zcount.%d\n",time(NULL)-bp->hdrtime,i,bp->numhashes,bp->n,iguana_needhdrs(coin),queue_size(&coin->hdrsQ),coin->zcount);
@ -1158,7 +1158,7 @@ int32_t iguana_pollQsPT(struct iguana_info *coin,struct iguana_peer *addr)
}
if ( bp == 0 || z != 0 )
{
printf("%s request HDR.(%s) numhashes.%d\n",addr!=0?addr->ipaddr:"local",hashstr,bp!=0?bp->numhashes:0);
//printf("%s request HDR.(%s) numhashes.%d\n",addr!=0?addr->ipaddr:"local",hashstr,bp!=0?bp->numhashes:0);
iguana_send(coin,addr,serialized,datalen);
addr->pendhdrs++;
flag++;

Loading…
Cancel
Save