diff --git a/iguana/exchanges/LP_bitcoin.c b/iguana/exchanges/LP_bitcoin.c index b0c7fd14c..c55bdefc1 100644 --- a/iguana/exchanges/LP_bitcoin.c +++ b/iguana/exchanges/LP_bitcoin.c @@ -2125,21 +2125,19 @@ char *bitcoin_address(char *symbol,char *coinaddr,uint8_t taddr,uint8_t addrtype } else if ( len == 33 || len == 65 ) { - strcpy(coinaddr,"0x"); if ( len == 33 ) { if ( ctx == 0 ) ctx = bitcoin_ctx(); bitcoin_expandcompressed(ctx,bigpubkey,pubkey_or_rmd160); LP_etomic_pub2addr(coinaddr+2,bigpubkey+1); - for (i=0; i<33; i++) + /*for (i=0; i<33; i++) printf("%02x",pubkey_or_rmd160[i]); printf(" compressed -> "); for (i=0; i<65; i++) printf("%02x",bigpubkey[i]); - printf(" -> %s\n",coinaddr); - } - else LP_etomic_pub2addr(coinaddr+2,pubkey_or_rmd160+1); + printf(" -> %s\n",coinaddr);*/ + } else LP_etomic_pub2addr(coinaddr,pubkey_or_rmd160+1); return(coinaddr); } } diff --git a/iguana/exchanges/LP_privkey.c b/iguana/exchanges/LP_privkey.c index 1add9c335..e6321820d 100644 --- a/iguana/exchanges/LP_privkey.c +++ b/iguana/exchanges/LP_privkey.c @@ -312,8 +312,8 @@ bits256 LP_privkeycalc(void *ctx,uint8_t *pubkey33,bits256 *pubkeyp,struct iguan strcpy(coin->smartaddr,checkaddr); decode_hex(checkrmd160,20,checkaddr+2); bitcoin_addr2rmd160(coin->symbol,coin->taddr,&checktype,rmd160,checkaddr); - if ( memcmp(rmd160,checkrmd160,20) == 0 ) - printf("rmd160 matches\n"); + if ( memcmp(rmd160,checkrmd160,20) != 0 ) + printf("rmd160 doesnt match\n"); } else printf("error getting addr (%s) != (%s)\n",checkaddr,checkaddr2); } else printf("pubkey 64 mismatch\n"); } else printf("error creating pubkey\n");