From d4b50f53649ec536ccf63ae37286db1197b5dde6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 24 May 2017 21:46:03 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_unspents.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_unspents.c b/iguana/exchanges/LP_unspents.c index 0d02df624..ed0ba0726 100644 --- a/iguana/exchanges/LP_unspents.c +++ b/iguana/exchanges/LP_unspents.c @@ -515,9 +515,9 @@ char *stats_JSON(cJSON *argjson,char *remoteaddr,uint16_t port) subport = argport + 2; if ( (peer= LP_peerfind((uint32_t)calc_ipbits(ipaddr),argport)) != 0 ) { - if ( (otherpeers= jint(argjson,"numpeers")) > 0 ) + if ( (otherpeers= jint(argjson,"numpeers")) > peer->numpeers ) peer->numpeers = otherpeers; - if ( (othernumutxos= jint(argjson,"numutxos")) > 0 ) + if ( (othernumutxos= jint(argjson,"numutxos")) > peer->numutxos ) peer->numutxos = othernumutxos; } else LP_addpeer(LP_mypubsock,ipaddr,argport,pushport,subport,jdouble(argjson,"profit")); if ( strcmp(method,"getpeers") == 0 )