From 1283a345ea3162a459b24f9d9fd968524e49204c Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Sun, 7 Oct 2018 23:00:46 +0300 Subject: [PATCH 01/13] [test] check iguana nodes connectivity before addnotary if node doesn't respond in 5 sec, we shouldn't add it (!) --- iguana/dpow/dpow_network.c | 61 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index 9c7fd209f..09821c90f 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -1303,6 +1303,60 @@ struct dpow_block *dpow_heightfind(struct supernet_info *myinfo,struct dpow_info int32_t dpow_signedtxgen(struct supernet_info *myinfo,struct dpow_info *dp,struct iguana_info *coin,struct dpow_block *bp,int8_t bestk,uint64_t bestmask,int32_t myind,uint32_t deprec,int32_t src_or_dest,int32_t useratified); void dpow_sigscheck(struct supernet_info *myinfo,struct dpow_info *dp,struct dpow_block *bp,int32_t myind,int32_t src_or_dest,int8_t bestk,uint64_t bestmask,uint8_t pubkeys[64][33],int32_t numratified); +int checknode(char *hostname, int portno, int timeout_rw) +{ +#if defined(_linux) || defined(__linux__) + + unsigned char iguana_reply[8]; // buffer for iguana reply + + int sockfd; + struct sockaddr_in serv_addr; + struct hostent *server; + + unsigned char reply_dat[] = { 0x00, 0x53, 0x50, 0x00, 0x00, 0x70, 0x00, 0x00 }; + unsigned int reply_dat_len = 8; + struct timeval timeout; + + sockfd = socket(AF_INET, SOCK_STREAM, 0); + if (sockfd < 0) return(-1); // error opening socket + server = gethostbyname(hostname); + if (server == NULL) { close(sockfd); return(-2); } // no such host + + bzero((char *) &serv_addr, sizeof(serv_addr)); + serv_addr.sin_family = AF_INET; + bcopy((char *)server->h_addr, + (char *)&serv_addr.sin_addr.s_addr, + server->h_length); + + serv_addr.sin_port = htons(portno); + + timeout.tv_sec = timeout_rw; + timeout.tv_usec = 0; + + if (setsockopt (sockfd, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, + sizeof(timeout)) < 0) + { close(sockfd); return(-3); } // set rcv timeout filed + + if (setsockopt (sockfd, SOL_SOCKET, SO_SNDTIMEO, (char *)&timeout, + sizeof(timeout)) < 0) + { close(sockfd); return(-4); } // set send timeout filed + + if (connect(sockfd,(struct sockaddr *) &serv_addr,sizeof(serv_addr)) < 0) + { close(sockfd); return(-5); } // port is closed + + int recv_count; + if( ( recv_count = recv(sockfd, iguana_reply , sizeof(iguana_reply) , 0)) < 0) + { close(sockfd); return(-6); } // recv is failed + + if ( recv_count != reply_dat_len ) { close(sockfd); return(-7); }// wrong reply size + + if (memcmp(iguana_reply, reply_dat, reply_dat_len) != 0) { close(sockfd); return(-8); } // wrong / unknown reply, possible it's not iguana on remote + + close(sockfd); +#endif // __linux__ + return 0; +} + int32_t dpow_addnotary(struct supernet_info *myinfo,struct dpow_info *dp,char *ipaddr) { char str[512]; uint32_t ipbits,*ptr; int32_t i,iter,n,retval = -1; @@ -1310,6 +1364,13 @@ int32_t dpow_addnotary(struct supernet_info *myinfo,struct dpow_info *dp,char *i return(-1); //if ( strcmp(ipaddr,"88.99.251.101") == 0 || strcmp(ipaddr,"82.202.193.100") == 0 ) // return(-1); + + // [+] Decker, if node doesn't respond in 5 sec, we shouldn't add it + if (checknode(ipaddr, Notaries_port, 5) != 0) { + printf("[Decker] Node " "\033[31m" "%s:%d" "\033[0m" "is dead!\n", ipaddr, Notaries_port); + return(-1); + } + portable_mutex_lock(&myinfo->notarymutex); if ( myinfo->dpowsock >= 0 )//&& myinfo->dexsock >= 0 ) { From 3ebe81fae296580357cbb19df207beb595186706 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Sun, 7 Oct 2018 23:05:02 +0300 Subject: [PATCH 02/13] + fix printout --- iguana/dpow/dpow_network.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index 09821c90f..d2c85e1ad 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -1367,7 +1367,7 @@ int32_t dpow_addnotary(struct supernet_info *myinfo,struct dpow_info *dp,char *i // [+] Decker, if node doesn't respond in 5 sec, we shouldn't add it if (checknode(ipaddr, Notaries_port, 5) != 0) { - printf("[Decker] Node " "\033[31m" "%s:%d" "\033[0m" "is dead!\n", ipaddr, Notaries_port); + printf("[Decker] Node " "\033[31m" "%s:%d" "\033[0m" " is dead!\n", ipaddr, Notaries_port); return(-1); } From b0488a4541a5e82bf2af710d4a58c0fec6d86fea Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Mon, 8 Oct 2018 01:25:40 +0300 Subject: [PATCH 03/13] + add static list of dead ips [128] in dpow_addnotary --- iguana/dpow/dpow_network.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index d2c85e1ad..f73a2a6ef 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -1360,16 +1360,38 @@ int checknode(char *hostname, int portno, int timeout_rw) int32_t dpow_addnotary(struct supernet_info *myinfo,struct dpow_info *dp,char *ipaddr) { char str[512]; uint32_t ipbits,*ptr; int32_t i,iter,n,retval = -1; + + // -B- [+] Decker --- + static uint32_t dead_ipbits[128]; + static int dead_ipsize; + int in_dead_flag; + uint32_t ip_pattern; + // -E- [+] Decker --- + if ( myinfo->IAMNOTARY == 0 ) return(-1); //if ( strcmp(ipaddr,"88.99.251.101") == 0 || strcmp(ipaddr,"82.202.193.100") == 0 ) // return(-1); - // [+] Decker, if node doesn't respond in 5 sec, we shouldn't add it + // -B- [+] Decker --- + if ((dead_ipsize == 0) || (dead_ipsize > 127)) { + for (int i_dead = 0; i_dead < 128; i_dead++) dead_ipbits[i_dead] = 0; + dead_ipsize = 0; + in_dead_flag = 0; + } else { + in_dead_flag = 0; + ip_pattern = (uint32_t)calc_ipbits(ipaddr); + for (int i_dead = 0; i_dead < dead_ipsize; i_dead++) if (dead_ipbits[i_dead] == ip_pattern) { in_dead_flag = 1; break; } + } + + if (in_dead_flag !=0) return -1; if (checknode(ipaddr, Notaries_port, 5) != 0) { + dead_ipbits[dead_ipsize] = (uint32_t)calc_ipbits(ipaddr); + dead_ipsize++; printf("[Decker] Node " "\033[31m" "%s:%d" "\033[0m" " is dead!\n", ipaddr, Notaries_port); - return(-1); + return -1; } + // -E- [+] Decker --- portable_mutex_lock(&myinfo->notarymutex); if ( myinfo->dpowsock >= 0 )//&& myinfo->dexsock >= 0 ) From 25686f0ebd2545552ad1c283be0153ca86831d67 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Mon, 8 Oct 2018 02:09:57 +0300 Subject: [PATCH 04/13] fix: every new ip now checks once and goes to dead or alive list --- iguana/dpow/dpow_network.c | 46 ++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index f73a2a6ef..6675cb181 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -1362,9 +1362,10 @@ int32_t dpow_addnotary(struct supernet_info *myinfo,struct dpow_info *dp,char *i char str[512]; uint32_t ipbits,*ptr; int32_t i,iter,n,retval = -1; // -B- [+] Decker --- - static uint32_t dead_ipbits[128]; - static int dead_ipsize; - int in_dead_flag; + static uint32_t list_ipbits[128]; + static int dead_or_alive[128]; // 0 - not set, -1 - dead, 1 - alive + static int list_ipsize; + int in_list_flag; uint32_t ip_pattern; // -E- [+] Decker --- @@ -1374,23 +1375,30 @@ int32_t dpow_addnotary(struct supernet_info *myinfo,struct dpow_info *dp,char *i // return(-1); // -B- [+] Decker --- - if ((dead_ipsize == 0) || (dead_ipsize > 127)) { - for (int i_dead = 0; i_dead < 128; i_dead++) dead_ipbits[i_dead] = 0; - dead_ipsize = 0; - in_dead_flag = 0; + // every new ip in BUS topology network goes to dead or white list forever, until iguana restart + ip_pattern = (uint32_t)calc_ipbits(ipaddr); + if ((list_ipsize == 0) || (list_ipsize > 127)) { + for (int i_list = 0; i_list < 128; i_list++) { list_ipbits[i_list] = 0; dead_or_alive[i_list] = 0; } + list_ipsize = 0; + in_list_flag = -1; } else { - in_dead_flag = 0; - ip_pattern = (uint32_t)calc_ipbits(ipaddr); - for (int i_dead = 0; i_dead < dead_ipsize; i_dead++) if (dead_ipbits[i_dead] == ip_pattern) { in_dead_flag = 1; break; } - } - - if (in_dead_flag !=0) return -1; - if (checknode(ipaddr, Notaries_port, 5) != 0) { - dead_ipbits[dead_ipsize] = (uint32_t)calc_ipbits(ipaddr); - dead_ipsize++; - printf("[Decker] Node " "\033[31m" "%s:%d" "\033[0m" " is dead!\n", ipaddr, Notaries_port); - return -1; - } + in_list_flag = -1; + for (int i_list = 0; i_list < list_ipsize; i_list++) if (list_ipbits[i_list] == ip_pattern) { in_list_flag = i_list; break; } + } + + if (in_list_flag == -1) { + list_ipbits[list_ipsize] = ip_pattern; + if (checknode(ipaddr, Notaries_port, 5) != 0) { + dead_or_alive[list_ipsize] = -1; + list_ipsize++; + printf("[Decker] Node " "\033[31m" "%s:%d" "\033[0m" " is dead!\n", ipaddr, Notaries_port); + return -1; + } else { + dead_or_alive[list_ipsize] = 1; + list_ipsize++; + } + } else + if (dead_or_alive[in_list_flag] == -1) return -1; // -E- [+] Decker --- portable_mutex_lock(&myinfo->notarymutex); From ce89f3d3d28d7b95b55760766d0dd32c8e8acf21 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Mon, 8 Oct 2018 13:50:21 +0300 Subject: [PATCH 05/13] + CHECKNODEIP compilation flag for dead / alive IP lists and checks --- iguana/dpow/dpow_network.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index 6675cb181..c6d3db7d5 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -1303,6 +1303,7 @@ struct dpow_block *dpow_heightfind(struct supernet_info *myinfo,struct dpow_info int32_t dpow_signedtxgen(struct supernet_info *myinfo,struct dpow_info *dp,struct iguana_info *coin,struct dpow_block *bp,int8_t bestk,uint64_t bestmask,int32_t myind,uint32_t deprec,int32_t src_or_dest,int32_t useratified); void dpow_sigscheck(struct supernet_info *myinfo,struct dpow_info *dp,struct dpow_block *bp,int32_t myind,int32_t src_or_dest,int8_t bestk,uint64_t bestmask,uint8_t pubkeys[64][33],int32_t numratified); +#ifdef CHECKNODEIP int checknode(char *hostname, int portno, int timeout_rw) { #if defined(_linux) || defined(__linux__) @@ -1356,11 +1357,13 @@ int checknode(char *hostname, int portno, int timeout_rw) #endif // __linux__ return 0; } +#endif int32_t dpow_addnotary(struct supernet_info *myinfo,struct dpow_info *dp,char *ipaddr) { char str[512]; uint32_t ipbits,*ptr; int32_t i,iter,n,retval = -1; + #ifdef CHECKNODEIP // -B- [+] Decker --- static uint32_t list_ipbits[128]; static int dead_or_alive[128]; // 0 - not set, -1 - dead, 1 - alive @@ -1368,12 +1371,14 @@ int32_t dpow_addnotary(struct supernet_info *myinfo,struct dpow_info *dp,char *i int in_list_flag; uint32_t ip_pattern; // -E- [+] Decker --- + #endif if ( myinfo->IAMNOTARY == 0 ) return(-1); //if ( strcmp(ipaddr,"88.99.251.101") == 0 || strcmp(ipaddr,"82.202.193.100") == 0 ) // return(-1); + #ifdef CHECKNODEIP // -B- [+] Decker --- // every new ip in BUS topology network goes to dead or white list forever, until iguana restart ip_pattern = (uint32_t)calc_ipbits(ipaddr); @@ -1400,6 +1405,7 @@ int32_t dpow_addnotary(struct supernet_info *myinfo,struct dpow_info *dp,char *i } else if (dead_or_alive[in_list_flag] == -1) return -1; // -E- [+] Decker --- + #endif portable_mutex_lock(&myinfo->notarymutex); if ( myinfo->dpowsock >= 0 )//&& myinfo->dexsock >= 0 ) From 24bbc546ca341b013ae9860a7f6b01edb13314b8 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 8 Oct 2018 05:19:13 -1100 Subject: [PATCH 06/13] Change default seed nodes --- iguana/exchanges/LP_nativeDEX.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 438767e08..1e8915d95 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -146,7 +146,7 @@ char GLOBAL_DBDIR[] = { "DB" }; char LP_myipaddr[64],USERHOME[512] = { "/root" }; char LP_gui[65] = { "cli" }; -char *default_LPnodes[] = { "5.9.253.195", "173.212.225.176", "136.243.45.140", "23.254.202.142", "45.32.19.196" +char *default_LPnodes[] = { "46.4.78.11", "46.4.87.18", "173.212.225.176", "136.243.45.140", "23.254.202.142", "45.32.19.196" //"24.54.206.138", "107.72.162.127", "72.50.16.86", "51.15.202.191", "173.228.198.88", //"51.15.203.171", "51.15.86.136", "51.15.94.249", "51.15.80.18", "51.15.91.40", "51.15.54.2", "51.15.86.31", "51.15.82.29", "51.15.89.155", "173.212.225.176", "136.243.45.140" }; @@ -1055,7 +1055,10 @@ void LP_initpeers(int32_t pubsock,struct LP_peerinfo *mypeer,char *myipaddr,uint } if ( (netid > 0 && netid < 9) && (seednode == 0 || seednode[0] == 0) ) { - sprintf(fixedseed,"5.9.253.%d",195 + netid); + if ( (seednode & 1) != 0 ) + strcpy(fixedseed,"46.4.78.11"); + else strcpy(fixedseed,"46.4.87.18"); + //sprintf(fixedseed,"5.9.253.%d",195 + netid); seednode = fixedseed; } if ( seednode == 0 || seednode[0] == 0 ) From 796041bd38ba03960743b2435fe87b2048718616 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 8 Oct 2018 05:20:24 -1100 Subject: [PATCH 07/13] New default seed nodes --- iguana/exchanges/LP_nativeDEX.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 7e8b66f4d..317bd9a1e 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -1034,7 +1034,10 @@ void LP_initpeers(int32_t pubsock,struct LP_peerinfo *mypeer,char *myipaddr,uint } if ( (netid > 0 && netid < 9) && (seednode == 0 || seednode[0] == 0) ) { - sprintf(fixedseed,"5.9.253.%d",195 + netid); + if ( (seednode & 1) != 0 ) + strcpy(fixedseed,"46.4.78.11"); + else strcpy(fixedseed,"46.4.87.18"); + //sprintf(fixedseed,"5.9.253.%d",195 + netid); seednode = fixedseed; } if ( seednode == 0 || seednode[0] == 0 ) From 04c5dec4c6620e738e8e0056ddafd763f61f1aea Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 8 Oct 2018 05:22:33 -1100 Subject: [PATCH 08/13] Netted --- iguana/exchanges/LP_nativeDEX.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 1e8915d95..98eaf5870 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -1055,7 +1055,7 @@ void LP_initpeers(int32_t pubsock,struct LP_peerinfo *mypeer,char *myipaddr,uint } if ( (netid > 0 && netid < 9) && (seednode == 0 || seednode[0] == 0) ) { - if ( (seednode & 1) != 0 ) + if ( (netid & 1) != 0 ) strcpy(fixedseed,"46.4.78.11"); else strcpy(fixedseed,"46.4.87.18"); //sprintf(fixedseed,"5.9.253.%d",195 + netid); From acdab342bc54792a7ecf567ed790ef9eebc54dda Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 8 Oct 2018 05:23:10 -1100 Subject: [PATCH 09/13] Netted --- iguana/exchanges/LP_nativeDEX.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 1e8915d95..98eaf5870 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -1055,7 +1055,7 @@ void LP_initpeers(int32_t pubsock,struct LP_peerinfo *mypeer,char *myipaddr,uint } if ( (netid > 0 && netid < 9) && (seednode == 0 || seednode[0] == 0) ) { - if ( (seednode & 1) != 0 ) + if ( (netid & 1) != 0 ) strcpy(fixedseed,"46.4.78.11"); else strcpy(fixedseed,"46.4.87.18"); //sprintf(fixedseed,"5.9.253.%d",195 + netid); From 2bf7491e3029561a38a9cfe0bc30f27e68d07d07 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 8 Oct 2018 05:28:39 -1100 Subject: [PATCH 10/13] Revert "Netted" This reverts commit 04c5dec4c6620e738e8e0056ddafd763f61f1aea. --- iguana/exchanges/LP_nativeDEX.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 98eaf5870..1e8915d95 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -1055,7 +1055,7 @@ void LP_initpeers(int32_t pubsock,struct LP_peerinfo *mypeer,char *myipaddr,uint } if ( (netid > 0 && netid < 9) && (seednode == 0 || seednode[0] == 0) ) { - if ( (netid & 1) != 0 ) + if ( (seednode & 1) != 0 ) strcpy(fixedseed,"46.4.78.11"); else strcpy(fixedseed,"46.4.87.18"); //sprintf(fixedseed,"5.9.253.%d",195 + netid); From 6b5193d9ea138083ed1190551a0f982b1f8409b6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 8 Oct 2018 05:29:03 -1100 Subject: [PATCH 11/13] Revert "Change default seed nodes" This reverts commit 24bbc546ca341b013ae9860a7f6b01edb13314b8. --- iguana/exchanges/LP_nativeDEX.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 1e8915d95..438767e08 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -146,7 +146,7 @@ char GLOBAL_DBDIR[] = { "DB" }; char LP_myipaddr[64],USERHOME[512] = { "/root" }; char LP_gui[65] = { "cli" }; -char *default_LPnodes[] = { "46.4.78.11", "46.4.87.18", "173.212.225.176", "136.243.45.140", "23.254.202.142", "45.32.19.196" +char *default_LPnodes[] = { "5.9.253.195", "173.212.225.176", "136.243.45.140", "23.254.202.142", "45.32.19.196" //"24.54.206.138", "107.72.162.127", "72.50.16.86", "51.15.202.191", "173.228.198.88", //"51.15.203.171", "51.15.86.136", "51.15.94.249", "51.15.80.18", "51.15.91.40", "51.15.54.2", "51.15.86.31", "51.15.82.29", "51.15.89.155", "173.212.225.176", "136.243.45.140" }; @@ -1055,10 +1055,7 @@ void LP_initpeers(int32_t pubsock,struct LP_peerinfo *mypeer,char *myipaddr,uint } if ( (netid > 0 && netid < 9) && (seednode == 0 || seednode[0] == 0) ) { - if ( (seednode & 1) != 0 ) - strcpy(fixedseed,"46.4.78.11"); - else strcpy(fixedseed,"46.4.87.18"); - //sprintf(fixedseed,"5.9.253.%d",195 + netid); + sprintf(fixedseed,"5.9.253.%d",195 + netid); seednode = fixedseed; } if ( seednode == 0 || seednode[0] == 0 ) From 1b1b1a46904d5ac27842a2f74f6a931b67c523b2 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 8 Oct 2018 05:31:05 -1100 Subject: [PATCH 12/13] -<<<< --- iguana/exchanges/LP_nativeDEX.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index eb4aa8c91..ec978a063 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -1055,14 +1055,10 @@ void LP_initpeers(int32_t pubsock,struct LP_peerinfo *mypeer,char *myipaddr,uint } if ( (netid > 0 && netid < 9) && (seednode == 0 || seednode[0] == 0) ) { -<<<<<<< HEAD if ( (netid & 1) != 0 ) strcpy(fixedseed,"46.4.78.11"); else strcpy(fixedseed,"46.4.87.18"); //sprintf(fixedseed,"5.9.253.%d",195 + netid); -======= - sprintf(fixedseed,"5.9.253.%d",195 + netid); ->>>>>>> dev seednode = fixedseed; } if ( seednode == 0 || seednode[0] == 0 ) From b5c159b5b4f7e4e977292c81f67d19223bce4c45 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 8 Oct 2018 05:45:00 -1100 Subject: [PATCH 13/13] Netid default seednodes --- iguana/exchanges/LP_nativeDEX.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 438767e08..ec978a063 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -1055,7 +1055,10 @@ void LP_initpeers(int32_t pubsock,struct LP_peerinfo *mypeer,char *myipaddr,uint } if ( (netid > 0 && netid < 9) && (seednode == 0 || seednode[0] == 0) ) { - sprintf(fixedseed,"5.9.253.%d",195 + netid); + if ( (netid & 1) != 0 ) + strcpy(fixedseed,"46.4.78.11"); + else strcpy(fixedseed,"46.4.87.18"); + //sprintf(fixedseed,"5.9.253.%d",195 + netid); seednode = fixedseed; } if ( seednode == 0 || seednode[0] == 0 )