|
|
@ -644,7 +644,7 @@ void iguana_startconnection(void *arg) |
|
|
|
printf("avoid self-loopback\n"); |
|
|
|
return; |
|
|
|
} |
|
|
|
printf("startconnection.(%s) pending.%u usock.%d addrind.%d\n",addr->ipaddr,addr->pending,addr->usock,addr->addrind); |
|
|
|
//printf("startconnection.(%s) pending.%u usock.%d addrind.%d\n",addr->ipaddr,addr->pending,addr->usock,addr->addrind);
|
|
|
|
addr->pending = (uint32_t)time(NULL); |
|
|
|
if ( (port= (uint16_t)(addr->ipbits >> 32)) == 0 ) |
|
|
|
port = coin->chain->portp2p; |
|
|
@ -653,7 +653,7 @@ void iguana_startconnection(void *arg) |
|
|
|
if ( addr->usock < 0 || coin->peers.shuttingdown != 0 ) |
|
|
|
{ |
|
|
|
strcpy(ipaddr,addr->ipaddr); |
|
|
|
printf("refused PEER KILLED. slot.%d for %s:%d usock.%d\n",addr->addrind,ipaddr,coin->chain->portp2p,addr->usock); |
|
|
|
//printf("refused PEER KILLED. slot.%d for %s:%d usock.%d\n",addr->addrind,ipaddr,coin->chain->portp2p,addr->usock);
|
|
|
|
iguana_iAkill(coin,addr,1); |
|
|
|
} |
|
|
|
else |
|
|
@ -671,7 +671,7 @@ void iguana_startconnection(void *arg) |
|
|
|
n++; |
|
|
|
iguana_iAconnected(coin,addr); |
|
|
|
coin->peers.numconnected++; |
|
|
|
printf("%s.PEER CONNECTED.%d:%d of max.%d! %s:%d usock.%d\n",coin->symbol,coin->peers.numconnected,n,coin->MAXPEERS,addr->ipaddr,coin->chain->portp2p,addr->usock); |
|
|
|
//printf("%s.PEER CONNECTED.%d:%d of max.%d! %s:%d usock.%d\n",coin->symbol,coin->peers.numconnected,n,coin->MAXPEERS,addr->ipaddr,coin->chain->portp2p,addr->usock);
|
|
|
|
if ( strcmp("127.0.0.1",addr->ipaddr) == 0 ) |
|
|
|
coin->peers.localaddr = addr; |
|
|
|
else if ( coin->peers.numranked == 0 ) |
|
|
|