jl777 7 years ago
parent
commit
8735b3939b
  1. 4
      iguana/exchanges/LP_commands.c
  2. 2
      iguana/exchanges/LP_peers.c

4
iguana/exchanges/LP_commands.c

@ -183,6 +183,7 @@ jpg(srcfile, destfile, power2=7, password, data="", required, ind=0)\n\
init_hexbytes_noT(pub33str,G.LP_pubsecp,33); init_hexbytes_noT(pub33str,G.LP_pubsecp,33);
jaddstr(retjson,"pubsecp",pub33str); jaddstr(retjson,"pubsecp",pub33str);
jadd(retjson,"coins",LP_coinsjson(LP_showwif)); jadd(retjson,"coins",LP_coinsjson(LP_showwif));
LP_cmdcount++;
return(jprint(retjson,1)); return(jprint(retjson,1));
} }
// if passphrase api and passphrase is right, ignore userpass, use hass of passphrase // if passphrase api and passphrase is right, ignore userpass, use hass of passphrase
@ -198,8 +199,7 @@ jpg(srcfile, destfile, power2=7, password, data="", required, ind=0)\n\
return(clonestr("{\"error\":\"authentication error you need to make sure userpass is set\"}")); return(clonestr("{\"error\":\"authentication error you need to make sure userpass is set\"}"));
if ( jobj(argjson,"userpass") != 0 ) if ( jobj(argjson,"userpass") != 0 )
jdelete(argjson,"userpass"); jdelete(argjson,"userpass");
if ( LP_cmdcount++ == 0 ) LP_cmdcount++;
printf("got first rpc command\n");
if ( strcmp(method,"passphrase") == 0 ) if ( strcmp(method,"passphrase") == 0 )
{ {
char coinaddr[64],pub33str[67]; char coinaddr[64],pub33str[67];

2
iguana/exchanges/LP_peers.c

@ -32,7 +32,7 @@ cJSON *LP_peerjson(struct LP_peerinfo *peer)
{ {
cJSON *item = cJSON_CreateObject(); cJSON *item = cJSON_CreateObject();
jaddstr(item,"isLP",peer->ipaddr); jaddstr(item,"isLP",peer->ipaddr);
jaddnum(item,"port",peer->port); jaddnum(item,"remoteport",peer->port-1);
jaddnum(item,"netid",peer->netid); jaddnum(item,"netid",peer->netid);
if ( strcmp(peer->ipaddr,LP_myipaddr) == 0 ) if ( strcmp(peer->ipaddr,LP_myipaddr) == 0 )
{ {

Loading…
Cancel
Save