From 51bb827d6184ab5ae5dc3d28797b081b4d9b5015 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 22 Sep 2017 12:38:33 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_ordermatch.c | 2 +- iguana/exchanges/LP_rpc.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index 787fc7581..e392e7d23 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -729,7 +729,7 @@ int32_t LP_listunspent_both(char *symbol,char *coinaddr) { if ( coin->electrum != 0 || LP_address_ismine(symbol,coinaddr) < 0 ) { - printf("issue path\n"); + printf("issue path electrum.%p\n",coin->electrum); n = LP_listunspent_issue(symbol,coinaddr); } else diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index eef057b00..904c48d77 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/iguana/exchanges/LP_rpc.c @@ -414,8 +414,7 @@ cJSON *LP_validateaddress(char *symbol,char *address) jaddstr(retjson,"scriptPubKey",script); } bitcoin_address(coinaddr,coin->taddr,coin->pubtype,G.LP_myrmd160,20); - if ( strcmp(address,coinaddr) == 0 ) - jadd(retjson,"ismine",cJSON_CreateTrue()); + jadd(retjson,"ismine",strcmp(address,coin->smartaddr) == 0 ? cJSON_CreateTrue() : cJSON_CreateFalse()); jadd(retjson,"iswatchonly",cJSON_CreateFalse()); jadd(retjson,"isscript",addrtype == coin->p2shtype ? cJSON_CreateTrue() : cJSON_CreateFalse()); return(retjson); @@ -437,7 +436,7 @@ int32_t LP_address_ismine(char *symbol,char *address) if ( jobj(retjson,"ismine") != 0 && is_cJSON_True(jobj(retjson,"ismine")) != 0 ) { doneflag = 1; - //printf("%s already ismine\n",address); + printf("%s ismine (%s)\n",address,jprint(retjson,0)); } //printf("%s\n",jprint(retjson,0)); free_json(retjson);