Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
0e80c1b102
  1. 2
      iguana/iguana777.h
  2. 6
      iguana/iguana_peers.c

2
iguana/iguana777.h

@ -86,7 +86,7 @@ struct iguana_txdatabits { uint64_t addrind:IGUANA_LOG2MAXPEERS,filecount:10,fpo
#define IGUANA_DEDICATED_THREADS
#ifdef IGUANA_DEDICATED_THREADS
#define IGUANA_MAXCONNTHREADS IGUANA_MINPEERS
#define IGUANA_MAXCONNTHREADS 128
#define IGUANA_MAXSENDTHREADS (IGUANA_MAXPEERS>>2)
#define IGUANA_MAXRECVTHREADS (IGUANA_MAXPEERS>>2)
#else

6
iguana/iguana_peers.c

@ -805,12 +805,12 @@ uint32_t iguana_possible_peer(struct iguana_info *coin,char *ipaddr)
return((uint32_t)time(NULL));
}
#endif
printf("check possible peer.(%s)\n",ipaddr);
//printf("check possible peer.(%s)\n",ipaddr);
for (i=n=0; i<coin->MAXPEERS; i++)
{
if ( strcmp(ipaddr,coin->peers.active[i].ipaddr) == 0 )
{
printf("(%s) already active\n",ipaddr);
//printf("(%s) already active\n",ipaddr);
free_queueitem(ipaddr);
return((uint32_t)time(NULL));
}
@ -832,7 +832,7 @@ uint32_t iguana_possible_peer(struct iguana_info *coin,char *ipaddr)
expand_ipbits(checkaddr,ipbits);
if ( strcmp(checkaddr,ipaddr) == 0 )
{
printf("valid ipaddr.(%s) MAXPEERS.%d\n",ipaddr,coin->MAXPEERS);
//printf("valid ipaddr.(%s) MAXPEERS.%d\n",ipaddr,coin->MAXPEERS);
if ( (iA= iguana_iAddrhashfind(coin,ipbits,1)) != 0 )
{
if ( iA->status != IGUANA_PEER_CONNECTING && iA->status != IGUANA_PEER_READY && iA->status != IGUANA_PEER_ELIGIBLE )

Loading…
Cancel
Save