Browse Source

Test

etomic
jl777 7 years ago
parent
commit
625ebe1383
  1. 16
      iguana/exchanges/LP_rpc.c

16
iguana/exchanges/LP_rpc.c

@ -440,7 +440,7 @@ cJSON *LP_listunspent(char *symbol,char *coinaddr)
int32_t LP_listunspent_issue(char *symbol,char *coinaddr)
{
struct iguana_info *coin; int32_t n = 0; cJSON *retjson=0; char *retstr=0;// uint16_t destport;
struct iguana_info *coin; int32_t n = 0; cJSON *retjson=0; char *retstr=0,destip[64]; uint16_t destport;
if ( symbol == 0 || symbol[0] == 0 )
return(0);
if ( (coin= LP_coinfind(symbol)) != 0 )
@ -461,13 +461,15 @@ int32_t LP_listunspent_issue(char *symbol,char *coinaddr)
//printf("SELF_LISTUNSPENT.(%s %s)\n",symbol,coinaddr);
}
else if ( IAMLP == 0 )
LP_listunspent_query(coin->symbol,coin->smartaddr);
/*else if ( (destport= LP_randpeer(destip)) > 0 )
{
retstr = issue_LP_listunspent(destip,destport,symbol,coinaddr);
printf("issue %s %s %s -> (%s)\n",coin->symbol,coinaddr,destip,retstr);
retjson = cJSON_Parse(retstr);
} else printf("LP_listunspent_issue couldnt get a random peer?\n");*/
LP_listunspent_query(coin->symbol,coin->smartaddr);
if ( (destport= LP_randpeer(destip)) > 0 )
{
retstr = issue_LP_listunspent(destip,destport,symbol,coinaddr);
printf("issue %s %s %s -> (%s)\n",coin->symbol,coinaddr,destip,retstr);
retjson = cJSON_Parse(retstr);
} else printf("LP_listunspent_issue couldnt get a random peer?\n");
}
if ( retjson != 0 )
{
n = cJSON_GetArraySize(retjson);

Loading…
Cancel
Save