From ecde5347b391727f4a2d6c46f0e5412f22f95a4c Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 9 Jul 2017 21:42:12 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_include.h | 2 ++ iguana/exchanges/LP_peers.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_include.h b/iguana/exchanges/LP_include.h index a8566530a..415e89a71 100644 --- a/iguana/exchanges/LP_include.h +++ b/iguana/exchanges/LP_include.h @@ -21,6 +21,8 @@ #ifndef LP_INCLUDE_H #define LP_INCLUDE_H +//#define LP_STRICTPEERS + #define LP_COMMAND_SENDSOCK NN_PUSH #define LP_COMMAND_RECVSOCK NN_PULL diff --git a/iguana/exchanges/LP_peers.c b/iguana/exchanges/LP_peers.c index 4828f6153..5e7a26cc3 100644 --- a/iguana/exchanges/LP_peers.c +++ b/iguana/exchanges/LP_peers.c @@ -57,8 +57,10 @@ char *LP_peers() struct LP_peerinfo *LP_addpeer(struct LP_peerinfo *mypeer,int32_t mypubsock,char *ipaddr,uint16_t port,uint16_t pushport,uint16_t subport,int32_t numpeers,int32_t numutxos,uint32_t sessionid) { uint32_t ipbits; int32_t pushsock,subsock,timeout; char checkip[64],pushaddr[64],subaddr[64]; struct LP_peerinfo *peer = 0; -if ( strncmp("5.9.253",ipaddr,strlen("5.9.253")) != 0 ) - return(0); +#ifdef LP_STRICTPEERS + if ( strncmp("5.9.253",ipaddr,strlen("5.9.253")) != 0 ) + return(0); +#endif ipbits = (uint32_t)calc_ipbits(ipaddr); expand_ipbits(checkip,ipbits); if ( strcmp(checkip,ipaddr) == 0 )