Browse Source

Test

etomic
jl777 8 years ago
parent
commit
dc07592cff
  1. 12
      iguana/exchanges/LP_utxos.c

12
iguana/exchanges/LP_utxos.c

@ -394,13 +394,17 @@ uint64_t LP_privkey_init(struct LP_peerinfo *mypeer,int32_t mypubsock,char *symb
iguana_priv2pub(pubkey33,coin->smartaddr,privkey,coin->pubtype); iguana_priv2pub(pubkey33,coin->smartaddr,privkey,coin->pubtype);
if ( coin->counter == 0 ) if ( coin->counter == 0 )
{ {
static uint32_t counter;
char tmpstr[128]; char tmpstr[128];
coin->counter++; coin->counter++;
bitcoin_priv2wif(USERPASS_WIFSTR,privkey,188); if ( counter++ == 0 )
{
bitcoin_priv2wif(USERPASS_WIFSTR,privkey,188);
conv_NXTpassword(userpass.bytes,pubkey.bytes,(uint8_t *)tmpstr,(int32_t)strlen(tmpstr));
userpub = curve25519(userpass,curve25519_basepoint9());
printf("userpass.(%s)\n",bits256_str(USERPASS,userpub));
}
bitcoin_priv2wif(tmpstr,privkey,coin->wiftype); bitcoin_priv2wif(tmpstr,privkey,coin->wiftype);
conv_NXTpassword(userpass.bytes,pubkey.bytes,(uint8_t *)tmpstr,(int32_t)strlen(tmpstr));
userpub = curve25519(userpass,curve25519_basepoint9());
printf("userpass.(%s)\n",bits256_str(USERPASS,userpub));
printf("%s (%s) %d wif.(%s) (%s)\n",symbol,coin->smartaddr,coin->pubtype,tmpstr,passphrase); printf("%s (%s) %d wif.(%s) (%s)\n",symbol,coin->smartaddr,coin->pubtype,tmpstr,passphrase);
if ( (retjson= LP_importprivkey(coin->symbol,tmpstr,coin->smartaddr,-1)) != 0 ) if ( (retjson= LP_importprivkey(coin->symbol,tmpstr,coin->smartaddr,-1)) != 0 )
printf("importprivkey -> (%s)\n",jprint(retjson,1)); printf("importprivkey -> (%s)\n",jprint(retjson,1));

Loading…
Cancel
Save