diff --git a/iguana/confs/BTCD_peers.txt b/iguana/confs/BTCD_peers.txt index 5226d6ac8..f954be17e 100644 --- a/iguana/confs/BTCD_peers.txt +++ b/iguana/confs/BTCD_peers.txt @@ -7,84 +7,79 @@ 89.248.160.243 89.248.160.244 89.248.160.245 -85.25.217.233 -65.15.37.140 -62.75.145.171 -176.9.13.13 -88.198.15.19 -51.255.38.28 -121.108.241.247 -82.229.201.131 -162.13.4.69 -78.226.160.96 -115.28.42.60 -178.62.185.131 -167.114.249.196 -81.181.155.53 -76.169.236.235 -67.165.77.192 -75.130.163.51 -72.55.148.203 -96.127.136.18 -88.198.53.194 -63.247.147.166 -88.206.186.58 -217.8.62.188 -46.231.137.186 -217.215.190.134 -2.86.63.69 -59.147.43.232 -104.42.224.48 -24.168.17.50 -173.65.129.85 -84.119.62.223 -59.147.43.232 -2.239.61.146 -176.28.45.179 -73.211.90.130 -185.48.78.78 -77.21.104.176 -46.253.169.134 -163.172.156.107 -74.120.222.234 -192.99.233.217 -162.255.117.105 -188.166.91.37 -149.56.122.72 -71.1.13.122 -88.113.76.138 -81.205.30.207 -203.189.127.54 -68.190.213.46 -98.202.147.55 -89.212.19.49 -162.210.92.46 -115.70.19.28 -68.43.220.127 -79.227.171.148 -68.46.103.181 -98.207.117.83 -79.200.255.204 -82.8.59.60 -71.241.204.215 -108.247.198.39 -156.57.141.221 -92.26.168.113 -71.53.157.49 -68.45.147.145 -79.54.185.53 -110.202.11.148 -91.82.171.9 -74.14.104.167 -95.116.195.148 -90.113.82.59 -98.118.105.12 -82.241.71.230 -98.161.16.55 -89.248.160.237 -93.211.231.89 -2.26.181.156 -89.248.160.244 -89.248.160.243 -89.248.160.242 -89.248.160.241 +5.9.102.210 +78.47.196.146 +85.25.217.233:14631 +88.198.53.194:55692 +88.206.186.58:37299 +162.255.117.105:63084 +115.28.42.60:60878 +82.176.15.155:35026 +88.198.15.19:48150 +176.9.13.13:14631 +217.8.62.188:52714 +162.13.4.69:55410 +211.58.177.43:35581 +63.247.147.166:50266 +24.168.17.50:50793 +46.231.137.186:56963 +178.62.185.131:35572 +62.75.145.171:14631 +89.212.19.49:48018 +192.99.233.217:42232 +68.190.213.46:14631 +162.210.92.46:14631 +98.118.105.12:60805 +75.130.163.51:56719 +51.255.38.28:14631 +88.110.117.18:52158 +24.101.114.249:55457 +99.44.222.86:62377 +108.61.166.209:58365 +98.208.113.72:62065 +72.133.226.130:14631 +5.189.144.97:58243 +14.203.46.202:57987 +98.202.147.55:60460 +24.45.172.109:14631 +89.114.38.65:52768 +68.59.64.126:50633 +68.43.220.127:4303 +81.205.30.207:63077 +113.87.28.142:62764 +73.211.90.130:41271 +110.174.129.213:49252 +68.45.147.145:57803 +95.232.175.161:62633 +73.229.133.160:38440 +124.191.14.253:54342 +167.114.249.196:52705 +92.24.168.248:52892 +93.158.216.201:14631 +158.69.27.82:46643 +104.204.109.11:63390 +68.157.88.187:56711 +71.53.152.87:5234 +82.229.201.131:63466 +59.147.42.146:57461 +81.0.91.211:53187 +82.241.71.230:51945 +108.247.198.39:64094 +77.22.227.8:65093 +122.166.169.11:49325 +173.76.182.122:14631 +173.24.82.253:14631 +100.13.54.119:14631 +2.26.181.208:14631 +94.242.213.3:14631 +87.149.45.42:36077 +98.207.117.83:50955 +71.1.8.48:14631 +71.1.8.48:50439 +101.166.241.31:14631 +178.143.154.142:27497 +103.255.7.59:58660 +156.57.132.119:62428 +60.225.171.82:36834 +46.223.149.120:43358 +37.157.215.75:4162 diff --git a/iguana/iguana_init.c b/iguana/iguana_init.c index 1e9704fb3..e15f033dc 100755 --- a/iguana/iguana_init.c +++ b/iguana/iguana_init.c @@ -302,7 +302,7 @@ void iguana_parseline(struct supernet_info *myinfo,struct iguana_info *coin,int3 //printf("parse line.(%s) maxpeers.%d\n",line,coin->MAXPEERS); if ( iter == 0 ) { - if ( (rand() % 2) == 0 && m < coin->MAXPEERS/2 ) + if ( m < coin->MAXPEERS/2 ) { if ( 0 && m == 0 ) { @@ -312,10 +312,13 @@ void iguana_parseline(struct supernet_info *myinfo,struct iguana_info *coin,int3 iguana_launch(coin,"connection",iguana_startconnection,addr,IGUANA_CONNTHREAD); } #ifndef IGUANA_DISABLEPEERS - addr = &coin->peers->active[m++]; - iguana_initpeer(coin,addr,(uint32_t)calc_ipbits(line)); - //printf("call initpeer.(%s)\n",addr->ipaddr); - iguana_launch(coin,"connection",iguana_startconnection,addr,IGUANA_CONNTHREAD); + //if ( (rand() % 2) == 0 ) + { + addr = &coin->peers->active[m++]; + iguana_initpeer(coin,addr,(uint32_t)calc_ipbits(line)); + //printf("call initpeer.(%s)\n",addr->ipaddr); + iguana_launch(coin,"connection",iguana_startconnection,addr,IGUANA_CONNTHREAD); + } //else iguana_possible_peer(coin,line); #endif } } diff --git a/iguana/iguana_peers.c b/iguana/iguana_peers.c index ad9c406a5..976ff9f12 100755 --- a/iguana/iguana_peers.c +++ b/iguana/iguana_peers.c @@ -392,6 +392,8 @@ int32_t iguana_socket(int32_t bindflag,char *hostname,uint16_t port) timeout.tv_sec = 0; timeout.tv_usec = 30000; setsockopt(sock,SOL_SOCKET,SO_RCVTIMEO,(void *)&timeout,sizeof(timeout)); + timeout.tv_sec = 0; + timeout.tv_usec = 10000; setsockopt(sock,SOL_SOCKET,SO_SNDTIMEO,(void *)&timeout,sizeof(timeout)); } opt = 0; @@ -506,14 +508,13 @@ int32_t iguana_send(struct iguana_info *coin,struct iguana_peer *addr,uint8_t *s //sleep(1); //continue; } - printf("send errno.%d %s\n",errno,strerror(errno)); - if ( errno != EAGAIN && errno != EWOULDBLOCK ) + //if ( errno != EAGAIN && errno != EWOULDBLOCK ) { printf("%s: %s numsent.%d vs remains.%d len.%d errno.%d (%s) usock.%d\n",serialized+4,addr->ipaddr,numsent,remains,len,errno,strerror(errno),addr->usock); printf("bad errno.%d %s zombify.%p\n",errno,strerror(errno),&addr->dead); addr->dead = (uint32_t)time(NULL); return(-errno); - } //else usleep(*sleeptimep), *sleeptimep *= 1.1; + } } else if ( remains > 0 ) {