Browse Source

Test

etomic
jl777 7 years ago
parent
commit
e06da87bee
  1. 2
      iguana/exchanges/LP_bitcoin.c
  2. 2
      iguana/exchanges/mm.c

2
iguana/exchanges/LP_bitcoin.c

@ -2207,7 +2207,7 @@ int32_t bitcoin_priv2wif(uint8_t wiftaddr,char *wifstr,bits256 privkey,uint8_t a
//data[0] = addrtype;
offset = 1;
}
memcpy(data+offset,privkey.bytes,sizeof(privkey));
memcpy(data+offset,privkey.bytes,len);
data[offset + len++] = 1;
len = base58encode_checkbuf(wiftaddr,addrtype,data,len);
if ( bitcoin_base58encode(wifstr,data,len) == 0 )

2
iguana/exchanges/mm.c

@ -117,7 +117,7 @@ int main(int argc, const char * argv[])
for (i=0; i<1000000000; i++)
{
OS_randombytes(privkey.bytes,sizeof(privkey));
bitcoin_priv2wif(0xab,wifstr,privkey,0x36);
bitcoin_priv2wif(0x36,wifstr,privkey,0xab);
if ( wifstr[3] == 'h' && wifstr[4] == 'u' && wifstr[5] == 's' )
{
printf("i.%d %s -> wif.%s\n",i,bits256_str(str,privkey),wifstr);

Loading…
Cancel
Save