From 6a370da408b9f63cdae3bd4479d0caff69f6249b Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 8 Jul 2017 14:45:45 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_peers.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_peers.c b/iguana/exchanges/LP_peers.c index c43264df9..96d677561 100644 --- a/iguana/exchanges/LP_peers.c +++ b/iguana/exchanges/LP_peers.c @@ -34,8 +34,11 @@ cJSON *LP_peerjson(struct LP_peerinfo *peer) jaddstr(item,"ipaddr",peer->ipaddr); jaddnum(item,"port",peer->port); if ( strcmp(peer->ipaddr,LP_myipaddr) == 0 ) + { jaddnum(item,"session",LP_sessionid); - else jaddnum(item,"session",peer->sessionid); + if ( LP_mypeer != 0 ) + jaddnum(item,"numutxos",LP_mypeer->numutxos); + } else jaddnum(item,"session",peer->sessionid); //jaddnum(item,"profit",peer->profitmargin); return(item); } @@ -68,6 +71,8 @@ if ( strncmp("5.9.253",ipaddr,strlen("5.9.253")) != 0 ) peer->numpeers = numpeers; if ( numutxos > peer->numutxos ) peer->numutxos = numutxos; + if ( peer->sessionid == 0 ) + peer->sessionid = sessionid; } else {