From f908bb0c8cf03fa91ed704202dfabb455c809b29 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 13 Oct 2017 17:05:56 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_nativeDEX.c | 3 +-- iguana/exchanges/LP_rpc.c | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index f6027076a..10f936fe9 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -344,7 +344,6 @@ int32_t LP_utxos_sync(struct LP_peerinfo *peer) printf("n.%d total %.8f\n",n,dstr(total)); if ( n > 0 && total > 0 && (retstr= issue_LP_listunspent(peer->ipaddr,peer->port,coin->symbol,coin->smartaddr)) != 0 ) { - printf("%s -> (%s)\n",peer->ipaddr,retstr); total2 = 0; if ( (array2= cJSON_Parse(retstr)) != 0 ) { @@ -383,7 +382,7 @@ int32_t LP_utxos_sync(struct LP_peerinfo *peer) } else printf("parse error (%s)\n",retstr); free(retstr); } - else if ( n == 0 && total == 0 ) + else if ( n != 0 && total != 0 ) printf("no response from %s for %s\n",peer->ipaddr,coin->symbol); } if ( (retstr= issue_LP_listunspent(peer->ipaddr,peer->port,coin->symbol,"")) != 0 ) diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index 93f9e2fbb..80ac137c7 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/iguana/exchanges/LP_rpc.c @@ -94,10 +94,11 @@ char *issue_LP_getprices(char *destip,uint16_t destport) char *issue_LP_listunspent(char *destip,uint16_t destport,char *symbol,char *coinaddr) { - char url[512]; + char url[512],*retstr; sprintf(url,"http://%s:%u/api/stats/listunspent?coin=%s&address=%s",destip,destport,symbol,coinaddr); - //printf("listunspent.(%s)\n",url); - return(LP_issue_curl("listunspent",destip,destport,url)); + retstr = LP_issue_curl("listunspent",destip,destport,url); + printf("listunspent.(%s) -> (%s)\n",url,retstr); + return(retstr); } char *LP_apicall(struct iguana_info *coin,char *method,char *params)