Browse Source

Test

etomic
jl777 8 years ago
parent
commit
04dc3a8627
  1. 2
      iguana/exchanges/LP_nativeDEX.c
  2. 4
      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);
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);

4
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));
}

Loading…
Cancel
Save