Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
7a8c36e95b
  1. 2
      iguana/iguana777.c
  2. 7
      iguana/iguana_peers.c

2
iguana/iguana777.c

@ -733,7 +733,7 @@ void iguana_coinloop(void *arg)
{
if ( coin->MAXPEERS > 1 && coin->peers.numranked < (7*coin->MAXPEERS/8) && now > coin->lastpossible )
{
//fprintf(stderr,"possible\n");
//fprintf(stderr,"check possible\n");
if ( coin->peers.numranked > 0 && (now % 60) == 0 )
iguana_send_ping(coin,coin->peers.ranked[rand() % coin->peers.numranked]);
coin->lastpossible = iguana_possible_peer(coin,0); // tries to connect to new peers

7
iguana/iguana_peers.c

@ -790,7 +790,7 @@ uint32_t iguana_possible_peer(struct iguana_info *coin,char *ipaddr)
printf("%s possible peer.(%s) %x already there\n",coin->symbol,ipaddr,(uint32_t)coin->peers.active[i].ipbits);
return(0);
}
printf("Q possible.(%s)\n",ipaddr);
//printf("Q possible.(%s)\n",ipaddr);
queue_enqueue("possibleQ",&coin->possibleQ,queueitem(ipaddr),1);
return((uint32_t)time(NULL));
}
@ -810,7 +810,7 @@ uint32_t iguana_possible_peer(struct iguana_info *coin,char *ipaddr)
{
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));
}
@ -846,8 +846,7 @@ uint32_t iguana_possible_peer(struct iguana_info *coin,char *ipaddr)
} else printf("ignore.(%s) lastconnect.%u lastkilled.%u numconnects.%d\n",ipaddr,iA->lastconnect,iA->lastkilled,iA->numconnects);
} //else printf("skip.(%s) ind.%d status.%d\n",ipaddr,iA->hh.itemind,iA->status);
} else printf("cant find (%s) which should have been created\n",ipaddr);
}
else printf("reject ipaddr.(%s) vs checkaddr.(%s)\n",ipaddr,checkaddr);
} else printf("reject ipaddr.(%s) vs checkaddr.(%s)\n",ipaddr,checkaddr);
}
}
free_queueitem(ipaddr);

Loading…
Cancel
Save