From a358f6b76a12e5475f6279eb187ae7c1565db976 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 18 Dec 2017 23:49:45 +0700 Subject: [PATCH] Test --- iguana/exchanges/LP_privkey.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_privkey.c b/iguana/exchanges/LP_privkey.c index 387548948..a40867afe 100644 --- a/iguana/exchanges/LP_privkey.c +++ b/iguana/exchanges/LP_privkey.c @@ -213,7 +213,7 @@ int32_t LP_wifstr_valid(char *wifstr) { printf("%s is valid wif\n",wifstr); return(1); - } else printf("invalid wifstr.(%s) wiftype.%d cmpstr.%s\n",wifstr,wiftype,cmpstr); + } //else printf("invalid wifstr.(%s) wiftype.%d cmpstr.%s\n",wifstr,wiftype,cmpstr); } return(0); } @@ -221,7 +221,7 @@ int32_t LP_wifstr_valid(char *wifstr) bits256 LP_privkeycalc(void *ctx,uint8_t *pubkey33,bits256 *pubkeyp,struct iguana_info *coin,char *passphrase,char *wifstr) { //static uint32_t counter; - bits256 privkey,userpub,zero,userpass,checkkey; char tmpstr[128]; cJSON *retjson; uint8_t tmptype; int32_t notarized; + bits256 privkey,userpub,zero,userpass,checkkey; char tmpstr[128]; cJSON *retjson; uint8_t tmptype; int32_t notarized; uint64_t nxtaddr; if ( (wifstr == 0 || wifstr[0] == 0) && LP_wifstr_valid(passphrase) > 0 ) { wifstr = passphrase; @@ -238,6 +238,8 @@ bits256 LP_privkeycalc(void *ctx,uint8_t *pubkey33,bits256 *pubkeyp,struct iguan else { bitcoin_wif2priv(coin->wiftaddr,&tmptype,&privkey,wifstr); + nxtaddr = conv_NXTpassword(privkey.bytes,pubkeyp->bytes,0,0); + RS_encode(G.LP_NXTaddr,nxtaddr); } privkey.bytes[0] &= 248, privkey.bytes[31] &= 127, privkey.bytes[31] |= 64; bitcoin_priv2pub(ctx,coin->pubkey33,coin->smartaddr,privkey,coin->taddr,coin->pubtype);