Browse Source

Test

etomic
jl777 8 years ago
parent
commit
4cecf4e742
  1. 9
      iguana/exchanges/LP_unspents.c

9
iguana/exchanges/LP_unspents.c

@ -90,21 +90,14 @@ cJSON *LP_peerjson(struct LP_peerinfo *peer)
jaddstr(item,"ipaddr",peer->ipaddr); jaddstr(item,"ipaddr",peer->ipaddr);
jaddnum(item,"port",peer->port); jaddnum(item,"port",peer->port);
jaddnum(item,"profit",peer->profitmargin); jaddnum(item,"profit",peer->profitmargin);
jaddnum(item,"numpeers",peer->numpeers);
jaddnum(item,"numutxos",peer->numutxos);
return(item); return(item);
} }
cJSON *LP_utxojson(struct LP_utxoinfo *utxo) cJSON *LP_utxojson(struct LP_utxoinfo *utxo)
{ {
struct LP_peerinfo *peer; cJSON *item = cJSON_CreateObject(); cJSON *item = cJSON_CreateObject();
jaddstr(item,"ipaddr",utxo->ipaddr); jaddstr(item,"ipaddr",utxo->ipaddr);
jaddnum(item,"port",utxo->port); jaddnum(item,"port",utxo->port);
if ( (peer= LP_peerfind((uint32_t)calc_ipbits(utxo->ipaddr),utxo->port)) != 0 )
{
jaddnum(item,"numpeers",peer->numpeers);
jaddnum(item,"numutxos",peer->numutxos);
}
jaddnum(item,"profit",utxo->profitmargin); jaddnum(item,"profit",utxo->profitmargin);
jaddstr(item,"coin",utxo->coin); jaddstr(item,"coin",utxo->coin);
jaddstr(item,"address",utxo->coinaddr); jaddstr(item,"address",utxo->coinaddr);

Loading…
Cancel
Save