jl777 8 years ago
parent
commit
87fa153083
  1. 22
      iguana/exchanges/LP_rpc.c

22
iguana/exchanges/LP_rpc.c

@ -503,18 +503,20 @@ void LP_listunspent_issue(char *symbol,char *coinaddr)
retjson = electrum_address_listunspent(symbol,coin->electrum,&retjson,coinaddr); retjson = electrum_address_listunspent(symbol,coin->electrum,&retjson,coinaddr);
else 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); retstr = issue_LP_listunspent(destip,destport,symbol,coinaddr);
if ( (retjson= cJSON_Parse(retstr)) != 0 ) retjson = cJSON_Parse(retstr);
{ }
if ( electrum_process_array(coin,0,coinaddr,retjson) != 0 ) if ( retjson != 0 )
{ {
printf("PROCESS INTERNAL.(%s)\n",coin->symbol); if ( electrum_process_array(coin,0,coinaddr,retjson) != 0 )
LP_postutxos(symbol,coinaddr); // might be good to not saturate 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 ) if ( retjson != 0 )

Loading…
Cancel
Save