From 04dc3a8627a03b7be9b171ab5a67442b88657f8f Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 29 May 2017 14:17:20 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_nativeDEX.c | 2 +- iguana/exchanges/LP_rpc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 1a53a9052..687af36a1 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -654,7 +654,7 @@ uint64_t LP_privkey_init(struct LP_peerinfo *mypeer,int32_t mypubsock,char *symb char tmpstr[128]; bitcoin_priv2wif(tmpstr,privkey,coin->wiftype); printf("%s coinaddr.%s %d wif.(%s)\n",symbol,coinaddr,coin->pubtype,tmpstr); - if ( (retjson= LP_importprivkey(coin->symbol,tmpstr)) != 0 ) + if ( (retjson= LP_importprivkey(coin->symbol,tmpstr,-1)) != 0 ) printf("importprivkey -> (%s)\n",jprint(retjson,1)); } bitcoin_addr2rmd160(&tmptype,rmd160,coinaddr); diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index 0a2b56888..58370c2d6 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/iguana/exchanges/LP_rpc.c @@ -113,10 +113,10 @@ cJSON *LP_validateaddress(char *symbol,char *address) return(bitcoin_json(coin,"validateaddress",buf)); } -cJSON *LP_importprivkey(char *symbol,char *wifstr) +cJSON *LP_importprivkey(char *symbol,char *wifstr,int32_t flag) { char buf[512]; struct iguana_info *coin = LP_coinfind(symbol); - sprintf(buf,"\"%s\"",wifstr); + sprintf(buf,"[\"%s\", %s]",wifstr,flag < 0 ? "false" : "true"); return(bitcoin_json(coin,"importprivkey",buf)); }