diff --git a/iguana/exchanges/LP_peers.c b/iguana/exchanges/LP_peers.c index 4e5e9a231..593046706 100644 --- a/iguana/exchanges/LP_peers.c +++ b/iguana/exchanges/LP_peers.c @@ -212,8 +212,8 @@ void LP_peer_recv(char *ipaddr,int32_t ismine) if ( (peer= LP_peerfind((uint32_t)calc_ipbits(ipaddr),RPC_port)) != 0 ) { peer->numrecv++; - if ( ismine != 0 ) - peer->recvtime = (uint32_t)time(NULL); + //if ( ismine != 0 ) + peer->recvtime = (uint32_t)time(NULL); } } @@ -262,7 +262,7 @@ uint16_t LP_rarestpeer(char *destip) { HASH_ITER(hh,LP_peerinfos,peer,tmp) { - if ( iter == 0 && peer->recvtime < now-3600*24 ) + if ( strcmp(peer->ipaddr,LP_myipaddr) != 0 && iter == 0 && peer->recvtime < now-3600 ) continue; if ( peer->isLP != 0 ) { diff --git a/iguana/exchanges/LP_signatures.c b/iguana/exchanges/LP_signatures.c index dc8e1b6ed..0aa0b42fd 100644 --- a/iguana/exchanges/LP_signatures.c +++ b/iguana/exchanges/LP_signatures.c @@ -611,7 +611,7 @@ char *LP_notify_recv(cJSON *argjson) LP_pubkey_sigcheck(pubp,argjson); if ( (ipaddr= jstr(argjson,"isLP")) != 0 ) { - //printf("notify got isLP %s %d\n",ipaddr,jint(argjson,"ismine")); + printf("notify got isLP %s %d\n",ipaddr,jint(argjson,"ismine")); LP_peer_recv(ipaddr,jint(argjson,"ismine")); if ( IAMLP != 0 && G.LP_IAMLP == 0 && strcmp(ipaddr,LP_myipaddr) == 0 ) { diff --git a/iguana/exchanges/stats.c b/iguana/exchanges/stats.c index a3232b1e6..69d6435ab 100644 --- a/iguana/exchanges/stats.c +++ b/iguana/exchanges/stats.c @@ -710,7 +710,7 @@ void LP_rpc_processreq(void *_ptr) else { response = malloc(strlen(retstr)+1024+1+1); - printf("alloc response.%p\n",response); + //printf("alloc response.%p\n",response); } sprintf(hdrs,"HTTP/1.1 200 OK\r\nAccess-Control-Allow-Origin: *\r\nAccess-Control-Allow-Credentials: true\r\nAccess-Control-Allow-Methods: GET, POST\r\nCache-Control : no-cache, no-store, must-revalidate\r\n%sContent-Length : %8d\r\n\r\n",content_type,(int32_t)strlen(retstr)); response[0] = '\0';