From fdcca4336a13e61313d5e46c50f11c0627a2b91f Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 30 Apr 2018 13:45:50 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_rpc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index 1d9477574..1f7ff25f1 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/iguana/exchanges/LP_rpc.c @@ -53,7 +53,7 @@ cJSON *bitcoin_json(struct iguana_info *coin,char *method,char *params) // printf("issue.(%s, %s, %s, %s, %s)\n",coin->symbol,coin->serverport,coin->userpass,method,params); if ( coin->electrum != 0 && (strcmp(method,"getblock") == 0 || strcmp(method,"paxprice") == 0 || strcmp(method,"getrawmempool") == 0) ) return(cJSON_Parse("{\"error\":\"illegal electrum call\"}")); - if ( coin->inactive == 0 && (strcmp(method,"importprivkey") != 0 && strcmp(method,"validateaddress") != 0 && strcmp(method,"getaddressinfo") != 0 && strcmp(method,"importaddress") != 0 && strcmp(method,"getrawtransaction") != 0 && strcmp(method,"getblock") != 0 && strcmp(method,"getinfo") != 0 && strcmp(method,"getblockchaininfo") == 0) ) + //if ( coin->inactive == 0 && (strcmp(method,"importprivkey") != 0 && strcmp(method,"validateaddress") != 0 && strcmp(method,"getaddressinfo") != 0 && strcmp(method,"importaddress") != 0 && strcmp(method,"getrawtransaction") != 0 && strcmp(method,"getblock") != 0 && strcmp(method,"getinfo") != 0 && strcmp(method,"getblockchaininfo") == 0) ) { if ( coin->electrum == 0 ) { @@ -77,7 +77,7 @@ cJSON *bitcoin_json(struct iguana_info *coin,char *method,char *params) } } } - } else retjson = cJSON_Parse("{\"result\":\"disabled\"}"); + } //else retjson = cJSON_Parse("{\"result\":\"disabled\"}"); } else printf("bitcoin_json cant talk to NULL coin\n"); return(retjson); } @@ -346,7 +346,7 @@ cJSON *LP_validateaddress(char *symbol,char *address) sprintf(buf,"[\"%s\"]",address); if ( (retjson= bitcoin_json(coin,coin->validateaddress,buf)) != 0 ) { - if ( jobj(retjson,"ismine") == 0 && strcmp(coin->validateaddress,"validateaddress") == 0 ) + if ( jobj(retjson,"error") == 0 && jobj(retjson,"ismine") == 0 && strcmp(coin->validateaddress,"validateaddress") == 0 ) { printf("autochange %s validateaddress -> getaddressinfo\n",coin->symbol); strcpy(coin->validateaddress,"getaddressinfo");