Browse Source

Test

etomic
jl777 8 years ago
parent
commit
9f24a3cb53
  1. 4
      iguana/exchanges/LP_commands.c
  2. 2
      iguana/exchanges/LP_nativeDEX.c

4
iguana/exchanges/LP_commands.c

@ -23,10 +23,12 @@ char *LP_numutxos()
cJSON *retjson = cJSON_CreateObject();
if ( LP_mypeer != 0 )
{
jaddstr(retjson,"ipaddr",LP_mypeer->ipaddr);
jaddnum(retjson,"port",LP_mypeer->port);
jaddnum(retjson,"numutxos",LP_mypeer->numutxos);
jaddnum(retjson,"numpeers",LP_mypeer->numpeers);
jaddnum(retjson,"session",LP_sessionid);
} jaddstr(retjson,"error","client node");
} else jaddstr(retjson,"error","client node");
return(jprint(retjson,1));
}

2
iguana/exchanges/LP_nativeDEX.c

@ -332,7 +332,7 @@ int32_t LP_mainloop_iter(void *ctx,char *myipaddr,struct LP_peerinfo *mypeer,int
{
if ( (retstr= issue_LP_numutxos(peer->ipaddr,peer->port,LP_mypeer->ipaddr,LP_mypeer->port,LP_mypeer->numpeers,LP_mypeer->numutxos)) != 0 )
{
printf("%s\n",retstr);
//printf("%s\n",retstr);
if ( (retjson= cJSON_Parse(retstr)) != 0 )
{
if ( (num= jint(retjson,"numutxos")) > peer->numutxos )

Loading…
Cancel
Save