jl777 7 years ago
parent
commit
87fa153083
  1. 16
      iguana/exchanges/LP_rpc.c

16
iguana/exchanges/LP_rpc.c

@ -503,20 +503,22 @@ void LP_listunspent_issue(char *symbol,char *coinaddr)
retjson = electrum_address_listunspent(symbol,coin->electrum,&retjson,coinaddr);
else
{
if ( (destport= LP_randpeer(destip)) > 0 )
if ( strcmp(coin->smartaddr,coinaddr) == 0 )
{
retjson = LP_listunspent(symbol,coinaddr);
printf("SELF_LISTUNSPENT.(%s %s)\n",symbol,coinaddr);
}
else if ( (destport= LP_randpeer(destip)) > 0 )
{
retstr = issue_LP_listunspent(destip,destport,symbol,coinaddr);
if ( (retjson= cJSON_Parse(retstr)) != 0 )
retjson = cJSON_Parse(retstr);
}
if ( retjson != 0 )
{
if ( electrum_process_array(coin,0,coinaddr,retjson) != 0 )
{
printf("PROCESS INTERNAL.(%s)\n",coin->symbol);
LP_postutxos(symbol,coinaddr); // might be good to not saturate
}
}
//printf("rand %s listunspent.(%s) to %s:%u -> %s\n",symbol,coinaddr,destip,destport,retstr);
}
}
if ( retjson != 0 )
free_json(retjson);
if ( retstr != 0 )

Loading…
Cancel
Save