Browse Source

Test

etomic
jl777 8 years ago
parent
commit
54d449ba6b
  1. 2
      iguana/exchanges/LP_nativeDEX.c
  2. 7
      iguana/exchanges/LP_rpc.c

2
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);
LP_importaddress(coin->symbol,tmpstr);
LP_importprivkey(coin->symbol,tmpstr);
}
bitcoin_addr2rmd160(&tmptype,rmd160,coinaddr);
LP_privkeyadd(privkey,rmd160);

7
iguana/exchanges/LP_rpc.c

@ -113,6 +113,13 @@ cJSON *LP_validateaddress(char *symbol,char *address)
return(bitcoin_json(coin,"validateaddress",buf));
}
cJSON *LP_importprivkey(char *symbol,char *wifstr)
{
char buf[512]; struct iguana_info *coin = LP_coinfind(symbol);
sprintf(buf,"\"%s\"",wifstr);
return(bitcoin_json(coin,"importprivkey",buf));
}
int32_t LP_importaddress(char *symbol,char *address)
{
char buf[1024],*retstr; cJSON *validatejson; int32_t isvalid=0,doneflag = 0; struct iguana_info *coin = LP_coinfind(symbol);

Loading…
Cancel
Save