Browse Source

test

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

2
iguana/iguana_bundles.c

@ -830,7 +830,7 @@ int32_t iguana_bundlehdr(struct iguana_info *coin,struct iguana_bundle *bp,int32
dist = 30 + (coin->current != 0 ? bp->hdrsi - coin->current->hdrsi : 0); dist = 30 + (coin->current != 0 ? bp->hdrsi - coin->current->hdrsi : 0);
if ( bp == coin->current ) if ( bp == coin->current )
dist = 3; dist = 3;
if ( time(NULL) > bp->hdrtime+dist && (bp == coin->current || bp->hdrsi >= coin->bundlescount-2 || (bp->numhashes < bp->n && (bp->speculative == 0 || bp->hdrsi >= coin->longestchain/bp->n))) ) //strcmp("BTC",coin->symbol) != 0 && if ( time(NULL) > bp->hdrtime+dist && (bp == coin->current || bp->hdrsi >= coin->bundlescount-2 || (bp->numhashes < bp->n && (bp->speculative == 0 || bp->hdrsi >= coin->longestchain/bp->n))) ) //strcmp("BTC",coin->symbol) != 0 &&
{ {
bp->hdrtime = (uint32_t)time(NULL); bp->hdrtime = (uint32_t)time(NULL);
queue_enqueue("hdrsQ",&coin->hdrsQ,queueitem(bits256_str(str,bp->hashes[0])),1); queue_enqueue("hdrsQ",&coin->hdrsQ,queueitem(bits256_str(str,bp->hashes[0])),1);

2
iguana/iguana_peers.c

@ -806,7 +806,7 @@ void *iguana_iAddriterator(struct iguana_info *coin,struct iguana_iAddr *iA)
printf("error rwiAddrind.%d\n",iA->hh.itemind); printf("error rwiAddrind.%d\n",iA->hh.itemind);
} }
} }
} else printf("no open peer slots left\n"); } else printf("%s no open peer slots left\n",coin->symbol);
} }
//else if ( iA != 0 ) //else if ( iA != 0 )
// printf("iA->ipbits %d, %d iguana_numthreads(coin,1 << IGUANA_CONNTHREAD) status.%d\n",iA->ipbits,iguana_numthreads(coin,1 << IGUANA_CONNTHREAD),iA->status); // printf("iA->ipbits %d, %d iguana_numthreads(coin,1 << IGUANA_CONNTHREAD) status.%d\n",iA->ipbits,iguana_numthreads(coin,1 << IGUANA_CONNTHREAD),iA->status);

2
iguana/iguana_recv.c

@ -839,7 +839,7 @@ struct iguana_bundlereq *iguana_recvblockhdrs(struct iguana_info *coin,struct ig
// printf("blockhash[%d] cant be found n.%d\n",i,n); // printf("blockhash[%d] cant be found n.%d\n",i,n);
} }
char str[65]; char str[65];
if ( 1 && bp == coin->current ) // if ( 1 && bp == coin->current )
printf("i.%d n.%d match.%d blockhdrs.%s hdrsi.%d\n",i,n,match,bits256_str(str,zblocks[0].RO.hash2),firstbp!=0?firstbp->hdrsi:-1); printf("i.%d n.%d match.%d blockhdrs.%s hdrsi.%d\n",i,n,match,bits256_str(str,zblocks[0].RO.hash2),firstbp!=0?firstbp->hdrsi:-1);
if ( firstbp != 0 && match == coin->chain->bundlesize-1 && n == firstbp->n ) if ( firstbp != 0 && match == coin->chain->bundlesize-1 && n == firstbp->n )
{ {

Loading…
Cancel
Save